1 Index: linux-2.6.32.9/drivers/pcmcia/yenta_socket.c
2 ===================================================================
3 --- linux-2.6.32.9.orig/drivers/pcmcia/yenta_socket.c 2010-03-12 09:43:45.000000000 +0100
4 +++ linux-2.6.32.9/drivers/pcmcia/yenta_socket.c 2010-03-12 10:05:33.000000000 +0100
6 * Probe for usable interrupts using the force
7 * register to generate bogus card status events.
9 +#ifndef CONFIG_BCM47XX
10 + /* WRT54G3G does not like this */
11 cb_writel(socket, CB_SOCKET_EVENT, -1);
12 cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
13 exca_writeb(socket, I365_CSCINT, 0);
16 cb_writel(socket, CB_SOCKET_MASK, 0);
17 exca_writeb(socket, I365_CSCINT, 0);
20 mask = probe_irq_mask(val) & 0xffff;
24 socket->socket.irq_mask = 0;
26 + /* irq mask probing is broken for the WRT54G3G */
27 + if (socket->socket.irq_mask == 0)
28 + socket->socket.irq_mask = 0x6f8;
30 dev_printk(KERN_INFO, &socket->dev->dev,
31 "ISA IRQ mask 0x%04x, PCI irq %d\n",
32 socket->socket.irq_mask, socket->cb_irq);
33 @@ -1198,6 +1205,15 @@
34 dev_printk(KERN_INFO, &dev->dev,
35 "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
37 + /* Generate an interrupt on card insert/remove */
38 + config_writew(socket, CB_SOCKET_MASK, CB_CSTSMASK | CB_CDMASK);
40 + /* Set up Multifunction Routing Status Register */
41 + config_writew(socket, 0x8C, 0x1000 /* MFUNC3 to GPIO3 */ | 0x2 /* MFUNC0 to INTA */);
43 + /* Switch interrupts to parallelized */
44 + config_writeb(socket, 0x92, 0x64);
46 yenta_fixup_parent_bridge(dev->subordinate);
48 /* Register it with the pcmcia layer.. */