aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaustav Majumdar <kaustav.majumdar@wipro.com>2006-10-20 17:44:09 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2006-10-25 21:59:39 -0400
commit4708b5faf7c53bb4128d34267bdfe4b8c74b488a (patch)
treeb97be8152e28bb0e2f9d992e7b810cb2366c0a73
parent01918d16c837485ceba92d48fb734cf520e61144 (diff)
[PATCH] pcmcia: update alloc_io_space for conflict checking for multifunction PC card
Some PCMCIA cards do not mention specific IO addresses in the CIS. In that case, inside the alloc_io_space function, conflicts are detected (the function returns 1) for the second function of a multifunction card unless the length of IO address range required is greater than 0x100. The following patch will remove this conflict checking for a PCMCIA function which had not mentioned any specific IO address to be mapped from. The patch is tested for Linux kernel 2.6.15.4 and works fine in the above case and is as suggested by Dave Hinds. Signed-off-by: Kaustav Majumdar <kaustav.majumdar@wipro.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/pcmcia_resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 74cebd424032..b9201c2ec38b 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -95,7 +95,7 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
95 * potential conflicts, just the most obvious ones. 95 * potential conflicts, just the most obvious ones.
96 */ 96 */
97 for (i = 0; i < MAX_IO_WIN; i++) 97 for (i = 0; i < MAX_IO_WIN; i++)
98 if ((s->io[i].res) && 98 if ((s->io[i].res) && *base &&
99 ((s->io[i].res->start & (align-1)) == *base)) 99 ((s->io[i].res->start & (align-1)) == *base))
100 return 1; 100 return 1;
101 for (i = 0; i < MAX_IO_WIN; i++) { 101 for (i = 0; i < MAX_IO_WIN; i++) {