Skip to content

Commit

Permalink
[PATCH] pcmcia: 8 and 16 bit access for static_map
Browse files Browse the repository at this point in the history
The PCMCIA card services layer is never setting the i/o map attributes when
SS_CAP_STATIC_MAP is specified.  Net result, sockets' set_io_map() calls
always see requests with most flags clear, meaning 8 bit access.

For hardware that always autosizes, that won't matter; and all current
STATIC_MAP drivers ignore those attributes.  A new driver (for at91rm9200)
suffers badly from this, since this forces everything into 8 bit mode and
that breaks both (a) cards requiring 16 bit access, and (b) ide-cs; but of
course 8-bit cards work OK (as does accessing card attributes).

So this patch arranges to pass the attributes down, matching the behavior
for non-static mappings (using the first/only I/O window).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dominik Brodowski authored and Linus Torvalds committed Jun 28, 2005
1 parent 1a8ceaf commit 57b6281
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pcmcia/pcmcia_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
}
if ((s->features & SS_CAP_STATIC_MAP) && s->io_offset) {
*base = s->io_offset | (*base & 0x0fff);
s->io[0].Attributes = attr;
return 0;
}
/* Check for an already-allocated window that must conflict with
Expand Down

0 comments on commit 57b6281

Please sign in to comment.