Can you add a "printk()" to "yenta_events()" that shows the value of both
"csc" and "cb_event", and additionally shows CB_STATUS. Something like
the appended (and totally untested) patch..
It's going to be very noisy when the problem happens (you'll see 10000
lines scroll by very quickly), but it would be good to see what the last
lines were. Just to see if some event/state seems stuck..
Linus
===== drivers/pcmcia/yenta_socket.c 1.65 vs edited =====
--- 1.65/drivers/pcmcia/yenta_socket.c 2004-12-01 00:14:04 -08:00
+++ edited/drivers/pcmcia/yenta_socket.c 2005-01-11 11:52:10 -08:00
@@ -401,7 +401,7 @@
static unsigned int yenta_events(struct yenta_socket *socket)
{
u8 csc;
- u32 cb_event;
+ u32 cb_event, cb_state;
unsigned int events;
/* Clear interrupt status for the event */
@@ -409,6 +409,9 @@
cb_writel(socket, CB_SOCKET_EVENT, cb_event);
csc = exca_readb(socket, I365_CSC);
+
+ cb_state = cb_readl(socket, CB_SOCKET_STATE);
+ printk("yenta: event %08x state %08x csc %02x\n", cb_event, cb_state, csc);
events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ;
events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0;