From: David Hinds This fixes interrupt allocation for 16-bit PCMCIA cards, so that on systems supporting ISA bus interrupts, if all ISA interrupts are unavailable, we'll fall back on sharing the bridge PCI interrupt. drivers/pcmcia/cs.c | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff -puN drivers/pcmcia/cs.c~pcmcia-16bit-interrupt-selection-fix drivers/pcmcia/cs.c --- 25/drivers/pcmcia/cs.c~pcmcia-16bit-interrupt-selection-fix 2003-12-21 22:01:48.000000000 -0800 +++ 25-akpm/drivers/pcmcia/cs.c 2003-12-21 22:01:48.000000000 -0800 @@ -1916,7 +1916,7 @@ int pcmcia_request_irq(client_handle_t h { struct pcmcia_socket *s; config_t *c; - int ret = 0, irq = 0; + int ret = CS_IN_USE, irq = 0; if (CHECK_HANDLE(handle)) return CS_BAD_HANDLE; @@ -1928,13 +1928,9 @@ int pcmcia_request_irq(client_handle_t h return CS_CONFIGURATION_LOCKED; if (c->state & CONFIG_IRQ_REQ) return CS_IN_USE; - - /* Short cut: if there are no ISA interrupts, then it is PCI */ - if (!s->irq_mask) { - irq = s->pci_irq; - ret = (irq) ? 0 : CS_IN_USE; + #ifdef CONFIG_PCMCIA_PROBE - } else if (s->irq.AssignedIRQ != 0) { + if (s->irq.AssignedIRQ != 0) { /* If the interrupt is already assigned, it must match */ irq = s->irq.AssignedIRQ; if (req->IRQInfo1 & IRQ_INFO2_VALID) { @@ -1943,7 +1939,6 @@ int pcmcia_request_irq(client_handle_t h } else ret = ((req->IRQInfo1&IRQ_MASK) == irq) ? 0 : CS_BAD_ARGS; } else { - ret = CS_IN_USE; if (req->IRQInfo1 & IRQ_INFO2_VALID) { u_int try, mask = req->IRQInfo2 & s->irq_mask; for (try = 0; try < 2; try++) { @@ -1958,12 +1953,13 @@ int pcmcia_request_irq(client_handle_t h irq = req->IRQInfo1 & IRQ_MASK; ret = try_irq(req->Attributes, irq, 1); } -#else - } else { - ret = CS_UNSUPPORTED_MODE; + } #endif + if (ret != 0) { + if (!s->pci_irq) + return ret; + irq = s->pci_irq; } - if (ret != 0) return ret; if (req->Attributes & IRQ_HANDLE_PRESENT) { if (request_irq(irq, req->Handler, _