2.4.25 yenta problem and small fix/workaround
Hello!
Inserting a PC Card in my laptop (IMB R40 2681) with kernel 2.4.25 results in the following message:
Feb 19 11:10:16 [kernel] cs: socket d603e000 voltage interrogation timed out
This sometimes happens with 2.6.x too, but issuing cardctl insert 0 usually solves the problem, however in this case it didn't. I tried to modify all the pcmcia_core module parameters but to no avail, the socket remained dead.
Examining the sources I noticed that 2.4.25 introduced this three line check; I suppose that the socket state read returns a valid state and cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST) is not executed. Removing the check and executing the last line regardless fixes the problem. I am probably experiencing a hardware bug limited to my laptop, but I'm posting this small patch here just in case someone has the same problem.
Regards,
Silla Rizzoli
drivers/pcmcia/yenta.c 2004-02-19 11:43:45.000000000 +0100 renamed from drivers/pcmcia/yenta.c.orig 2004-02-19 11:44:29.000000000 +0100 +0 -3
@@ -676,9 +676,6 @@ exca_writeb(socket, I365_GENCTL, 0x00); /* 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); }
Quoted 25 lines · Silla Rizzoli
Hello!
Inserting a PC Card in my laptop (IMB R40 2681) with kernel 2.4.25 results in the following message:Feb 19 11:10:16 [kernel] cs: socket d603e000 voltage interrogation timed outThis sometimes happens with 2.6.x too, but issuing cardctl insert 0 usually solves the problem, however in this case it didn't. I tried to modify all the
pcmcia_coremodule parameters but to no avail, the socket remained dead.Examining the sources I noticed that 2.4.25 introduced this three line check; I suppose that the socket state read returns a valid state and
cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST)is not executed. Removing the check and executing the last line regardless fixes the problem. I am probably experiencing a hardware bug limited to my laptop, but I'm posting this small patch here just in case someone has the same problem.Regards,
Silla Rizzoli
drivers/pcmcia/yenta.c 2004-02-19 11:43:45.000000000 +0100 line 681
Quoted 9 lines
drivers/pcmcia/yenta.c 2004-02-19 11:43:45.000000000 +0100 renamed from drivers/pcmcia/yenta.c.orig 2004-02-19 11:44:29.000000000 +0100 +0
-3@@ -676,9 +676,6 @@ exca_writeb(socket, I365_GENCTL, 0x00); /* 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); }
Hi Silla,
Unfortunately this change fixes other problems (in Acer TravelMate laptops for one I know, maybe others).
Someone needs to figure out a way for detection to work properly on both setups.
Quoted 8 lines
Hi Silla,
Unfortunately this change fixes other problems (in Acer TravelMate laptops for one I know, maybe others).
Someone needs to figure out a way for detection to work properly on both setups.
-
Ok.
Let me now if you need any further info.
Regards,
Silla Rizzoli
Quoted 10 lines · Silla Rizzoli
Inserting a PC Card in my laptop (IMB R40 2681) with kernel 2.4.25 results in the following message:
Feb 19 11:10:16 [kernel] cs: socket d603e000 voltage interrogation timed outThis sometimes happens with 2.6.x too, but issuing cardctl insert 0 usually solves the problem, however in this case it didn't. I tried to modify all the
pcmcia_coremodule parameters but to no avail, the socket remained dead.
That is a pisser. What brand and model of laptop is this, exactly? Did you ever use the pcmcia-cs modules on this laptop, and if so, did they behave the same? Does this happen with a specific card? Which one(s) are you using? Does it happen if you hot insert the card, or only if the card is inserted at startup? What CardBus bridge do you have (use 'lspci -v')?
As Marcello said, the change was introduced specifically to avoid this sort of problem, on certain other laptops.
-- Dave
Quoted 11 lines
That is a pisser. What brand and model of laptop is this, exactly? Did you ever use the pcmcia-cs modules on this laptop, and if so, did they behave the same? Does this happen with a specific card? Which one(s) are you using? Does it happen if you hot insert the card, or only if the card is inserted at startup? What CardBus bridge do you have (use 'lspci -v')?
As Marcello said, the change was introduced specifically to avoid this sort of problem, on certain other laptops.
-- Dave
The laptop is an IBM R40 2681-BDG. That means P4 1.8 GHz (non-Centrino), with chipset 845.
I own two pc cards, a Cisco Aironet 350 (AIR-PCM352) and a Option Globetrotter GSM/GPRS card, driven using serial_cs.
The cards always get correctly recognized in they are already inserted at boot time, but rarely if plug them in when my Gentoo has finished booting. To make them work a cardctl insert 0 (I only have one socket) usually helps, sometimes I have to unload/reload the pcmcia modules, and very very rarely a reboot is needed; this happens with 2.6.x and 2.4.25. The two PC Cards behave the same, maybe the Cisco one is a bit more picky.
You'll find a complete lspci here:
http://www.communicationvalley.it/lspci.txt
The kernel config for 2.6.3 here:
http://www.communicationvalley.it/2.6.3-oldradeon.cfg
The kernel config for 2.4.25 here:
http://www.communicationvalley.it/2.4.25.config
I only used pcmcia-cs on a distant past, but I'm downloading them now, I'll let you know how they work very soon.
Thanks,
Signature · 7 lines
Silla Rizzoli Communication Valley SpA Strada Quarta 6/1D 43100 Parma Tel: +39-0521-4980 Fax: +39-0521-498080 http://www.communicationvalley.it/