Fix Yenta ISA IRQs
PATCH 1/1 Fix Yenta ISA IRQs
Hi,
While looking at the Yenta IRQ problem, I discovered that some of the merges from the -ac tree a while ago did something undesirable, effectively disabling all ISA interrupts for Yenta sockets.
The following patch checks for the presence of ISA interrupts _before_ deciding that we don't have any rather than deciding we don't have any and then trying to probe for ISA interrupts.
Could people with Yenta interrupt problems:
(1) report the dmesg from bootup
(2) try with this patch applied with their standard configuration
(3) same as (2), but try disabling PNP support in their kernel, leaving i82365 enabled
(4) same as (2), but try leaving PNP support enabled, and disable
i82365
drivers/pcmcia/ti113x.h +0 -25
@@ -258,31 +258,6 @@if (new != reg)exca_writeb (socket,I365_INTCTL , new); -/* -* If ISA interrupts don't work, then fall back to routing card -* interrupts to the PCI interrupt of the socket. -* -* Tweaking this when we are using serial PCI IRQs causes hangs -* --rmk -*/ -if (!socket->socket.irq_mask) { -u8 irqmux, devctl; - - devctl =config_readb (socket,TI113X_DEVICE_CONTROL ); -if ((devctl &TI113X_DCR_IMODE_MASK ) !=TI12XX_DCR_IMODE_ALL_SERIAL ) { -printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n" ); - - devctl &= ~TI113X_DCR_IMODE_MASK ; - - irqmux =config_readl (socket,TI122X_IRQMUX ); - irqmux = (irqmux & ~0x0f ) |0x02 ;/* route INTA */ - irqmux = (irqmux & ~0xf0 ) |0x20 ;/* route INTB */ - -config_writel (socket,TI122X_IRQMUX , irqmux); -config_writeb (socket,TI113X_DEVICE_CONTROL , devctl); - } - } - socket->socket.ops->init = ti_init;return 0 ; }
drivers/pcmcia/yenta_socket.c +28 -1
@@ -506,7 +506,34 @@ socket->socket.irq_mask =yenta_probe_irq (socket, isa_irq_mask); socket->socket.cb_dev = socket->dev; -printk ("Yenta IRQ list %04x, PCI irq%d\n" , socket->socket.irq_mask, socket->cb_irq); +printk (KERN_INFO "Yenta: ISA IRQ list %04x, PCI irq%d\n" , + socket->socket.irq_mask, socket->cb_irq); + +/* +* If we didn't detect any ISA interrupts, fall back to routing +* card interrupts to the PCI interrupt of the socket. +* +* Tweaking this when we are using serial PCI IRQs causes hangs +* --rmk +*/ +if (socket->dev->vendor ==PCI_VENDOR_ID_TI && + socket->socket.irq_mask ==0 ) { +u8 irqmux, devctl; + + devctl =config_readb (socket,TI113X_DEVICE_CONTROL ); +if ((devctl &TI113X_DCR_IMODE_MASK ) !=TI12XX_DCR_IMODE_ALL_SERIAL ) { +printk (KERN_INFO "Yenta: Routing card interrupts to PCI\n" ); + + devctl &= ~TI113X_DCR_IMODE_MASK ; + + irqmux =config_readl (socket,TI122X_IRQMUX ); + irqmux = (irqmux & ~0x0f ) |0x02 ;/* route INTA */ + irqmux = (irqmux & ~0xf0 ) |0x20 ;/* route INTB */ + +config_writel (socket,TI122X_IRQMUX , irqmux); +config_writeb (socket,TI113X_DEVICE_CONTROL , devctl); + } + } }
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 10 lines · Russell King
Hi,
While looking at the Yenta IRQ problem, I discovered that some of the merges from the -ac tree a while ago did something undesirable, effectively disabling all ISA interrupts for Yenta sockets.
The following patch checks for the presence of ISA interrupts _before_ deciding that we don't have any rather than deciding we don't have any and then trying to probe for ISA interrupts.
Quoted 8 lines
Could people with Yenta interrupt problems:
(1) report the dmesg from bootup
(2) try with this patch applied with their standard configuration
(3) same as (2), but try disabling PNP support in their kernel, leaving i82365 enabled
(4) same as (2), but try leaving PNP support enabled, and disablei82365
Ok, ok, I messed up that (untested) patch. This one is more tested though, now that my previous x86 kernel build completed...
It's still not perfect - I'm now seeing:
PCI: Found IRQ 11 for device 0000:00:02.0 PCI: Sharing IRQ 11 with 0000:00:03.0 Yenta: ISA IRQ list 00b8, PCI irq11 Socket status: 30000006 PCI: Found IRQ 11 for device 0000:00:02.1 Yenta: ISA IRQ list 00b0, PCI irq11 Socket status: 30000020 Intel PCIC probe: PNP invalid resources ? pnp: Device 00:14 disabled. not found.
from my PCI1450 device in my laptop (note the differing ISA IRQ list between the sockets - 2.4 reports 00b8 for both.)
drivers/pcmcia/ti113x.h +0 -25
@@ -258,31 +258,6 @@if (new != reg)exca_writeb (socket,I365_INTCTL , new); -/* -* If ISA interrupts don't work, then fall back to routing card -* interrupts to the PCI interrupt of the socket. -* -* Tweaking this when we are using serial PCI IRQs causes hangs -* --rmk -*/ -if (!socket->socket.irq_mask) { -u8 irqmux, devctl; - - devctl =config_readb (socket,TI113X_DEVICE_CONTROL ); -if ((devctl &TI113X_DCR_IMODE_MASK ) !=TI12XX_DCR_IMODE_ALL_SERIAL ) { -printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n" ); - - devctl &= ~TI113X_DCR_IMODE_MASK ; - - irqmux =config_readl (socket,TI122X_IRQMUX ); - irqmux = (irqmux & ~0x0f ) |0x02 ;/* route INTA */ - irqmux = (irqmux & ~0xf0 ) |0x20 ;/* route INTB */ - -config_writel (socket,TI122X_IRQMUX , irqmux); -config_writeb (socket,TI113X_DEVICE_CONTROL , devctl); - } - } - socket->socket.ops->init = ti_init;return 0 ; }
drivers/pcmcia/yenta_socket.c +94 -67
173 lines not on this page · raw message
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html