As its just one pin which can be used for IRQs on PCMCIA/CardBus cards, and only the _socket drivers_ care with which IRQ this pin is connected, only the socket drivers (assisted by the PCCARD core) should care about which IRQ to use. Therefore, ignore the information passed to pcmcia_request_irq() in IRQInfo2. In additional patches, all in-kernel users of IRQInfo2 will be removed; users wishing to influence the usage of IRQs can do so by modifying several driver's irq_mask parameter and/or by adding "exclude irq 3" to /etc/pcmcia/config.opts. Note that a new sysfs-based interface to do so will be added in subsequent patches. Signed-off-by: Dominik Brodowski --- drivers/pcmcia/cs.c | 37 +++++++++++++++---------------------- include/pcmcia/cs.h | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) Index: 2.6.10/drivers/pcmcia/cs.c =================================================================== --- 2.6.10.orig/drivers/pcmcia/cs.c 2004-12-27 18:03:08.000000000 +0100 +++ 2.6.10/drivers/pcmcia/cs.c 2004-12-29 11:25:54.081315266 +0100 @@ -1551,30 +1551,23 @@ return CS_IN_USE; #ifdef CONFIG_PCMCIA_PROBE - if (s->irq.AssignedIRQ != 0) { - /* If the interrupt is already assigned, it must match */ - irq = s->irq.AssignedIRQ; - if (req->IRQInfo1 & IRQ_INFO2_VALID) { - u_int mask = req->IRQInfo2 & s->irq_mask; - ret = ((mask >> irq) & 1) ? 0 : CS_BAD_ARGS; - } else - ret = ((req->IRQInfo1&IRQ_MASK) == irq) ? 0 : CS_BAD_ARGS; - } else { - if (req->IRQInfo1 & IRQ_INFO2_VALID) { - u_int try, mask = req->IRQInfo2 & s->irq_mask; - for (try = 0; try < 2; try++) { - for (irq = 0; irq < 32; irq++) - if ((mask >> irq) & 1) { - ret = try_irq(req->Attributes, irq, try); - if (ret == 0) break; - } - if (ret == 0) break; - } + if (s->irq.AssignedIRQ != 0) { + /* If the interrupt is already assigned, it must be the same */ + irq = s->irq.AssignedIRQ; } else { - irq = req->IRQInfo1 & IRQ_MASK; - ret = try_irq(req->Attributes, irq, 1); + u_int try, mask = s->irq_mask; + for (try = 0; try < 2; try++) { + for (irq = 0; irq < 32; irq++) { + if ((mask >> irq) & 1) { + ret = try_irq(req->Attributes, irq, try); + if (!ret) + break; + } + } + if (!ret) + break; + } } - } #endif if (ret != 0) { if (!s->pci_irq) Index: 2.6.10/include/pcmcia/cs.h =================================================================== --- 2.6.10.orig/include/pcmcia/cs.h 2004-12-27 18:03:07.000000000 +0100 +++ 2.6.10/include/pcmcia/cs.h 2004-12-29 11:25:46.878328344 +0100 @@ -191,7 +191,7 @@ typedef struct irq_req_t { u_int Attributes; u_int AssignedIRQ; - u_int IRQInfo1, IRQInfo2; + u_int IRQInfo1, IRQInfo2; /* IRQInfo2 is ignored */ void *Handler; void *Instance; } irq_req_t;