Re: 2.4.25 yenta problem and small fix/workaround

From: Daniel Ritz
Date: Fri Feb 20 2004 - 17:40:14 EST


silla, does this one help?
dave, what do you think?

rgds
-daniel

patch:
the CB_CDETECT1 and CB_CDETECT2 bits both should be 0 for the card being
recognized correctly (and one of the voltage bits need to be set)

--- 1.15/drivers/pcmcia/yenta.c Tue Jan 6 11:55:05 2004
+++ edited/drivers/pcmcia/yenta.c Fri Feb 20 23:17:54 2004
@@ -135,8 +135,8 @@

val = (state & CB_3VCARD) ? SS_3VCARD : 0;
val |= (state & CB_XVCARD) ? SS_XVCARD : 0;
- val |= (state & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD | CB_3VCARD
- | CB_XVCARD | CB_YVCARD)) ? 0 : SS_PENDING;
+ val |= (state & (CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD)) ? 0 : SS_PENDING;
+ val |= (state & (CB_CDETECT1 | CB_CDETECT2)) ? SS_PENDING : 0;

if (state & CB_CBCARD) {
val |= SS_CARDBUS;
@@ -677,10 +677,9 @@

/* Redo card voltage interrogation */
state = cb_readl(socket, CB_SOCKET_STATE);
- if (!(state & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD |
- CB_3VCARD | CB_XVCARD | CB_YVCARD)))
-
- cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
+ if (!(state & (CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD)) ||
+ (state & (CB_CDETECT1 | CB_CDETECT2)))
+ cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
}

/* Called at resume and initialization events */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/