[PATCH] Fix PCMCIA card detection in 2.4 (in time for 2.4.25?)

From: Santiago Garcia Mantinan
Date: Fri Feb 06 2004 - 20:03:49 EST


Hi!

On 11th Aug 2003 I had reported yenya problems on Acer TravelMate 260 with
2.6.0test3, the bad news is that these problems also exist on 2.4 up to
2.4.25-test1, the good one is that Russell King had posted a fix on Oct 28
2003, similar subject than this message, that patch was for 2.6 and got into
2.6.0test10, so while this issue is solved in 2.6 kernels, it still exists
in 2.4. Today I tried to aply Russell's patch to 2.4, I had to rewrite it,
but otherwise it is exactly the same patch and it seems to work, at least in
my machine.

Can people test this so that we can clean up any doubts Marcelo may have and
it gets roled into 2.4.25?

Regards...
--
Manty/BestiaTester -> http://manty.net

--- old/drivers/pcmcia/yenta.c 2004-02-07 01:55:45.000000000 +0100
+++ new/drivers/pcmcia/yenta.c 2004-02-07 01:58:12.000000000 +0100
@@ -636,6 +636,7 @@
*/
static void yenta_config_init(pci_socket_t *socket)
{
+ u32 state;
u16 bridge;
struct pci_dev *dev = socket->dev;

@@ -675,6 +676,9 @@
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);
}

-
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/