[BUG][PATCH][pcmcia] cisinfo_t removal prevents card detection
Dominik Brodowski
linux at dominikbrodowski.net
Tue Jul 15 14:55:22 EDT 2008
Marc,
On Tue, Jul 15, 2008 at 03:26:15PM +0200, Marc Zyngier wrote:
> that entered mainline yesterday introduced a bug that prevents card detection
> on my platform (PXA255 based), and possibly others :
thanks, applied.
Dominik
---
>From 002b90a1bf5fe9c8de7a8634403a685621841ff3 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz at misterjones.org>
Date: Tue, 15 Jul 2008 15:26:15 +0200
Subject: [PATCH 2/3] pcmcia: fix cisinfo_t removal
The cisinfo_t removal patch (c5081d5f4775b2a3f858f91151bbf9163e473075
pcmcia: simplify pccard_validate_cis ) introduced a bug that prevented
card detection, for the (info->Chains == MAX_TUPLES) check was replaced
by (count), which is always true. Restoring the comparison to MAX_TUPLES
makes everybody happy...
[linux at dominikbrodowski.net: update changelog comment]
Signed-off-by: Marc Zyngier <marc.zyngier at altran.com>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
drivers/pcmcia/cistpl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index 9fcff0c..65129b5 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -1490,7 +1490,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
reserved++;
}
- if ((count) || (reserved > 5) ||
+ if ((count == MAX_TUPLES) || (reserved > 5) ||
((!dev_ok || !ident_ok) && (count > 10)))
count = 0;
--
1.5.4.3
More information about the linux-pcmcia
mailing list