From: Dominik Brodowski Debugging and description from: Noah Misch When a driver calls pcmcia_request_irq with IRQ_HANDLE_PRESENT unset, it looks for an open IRQ by request_irq()ing with a dummy handler and NULL dev_info. free_irq uses dev_info as a key for identifying the handler to free among those sharing an IRQ, so request_irq returns -EINVAL if dev_info is NULL and the IRQ may be shared. That unknown error code is the -EINVAL. It looks like only pcnet_cs and axnet_cs are affected. Most other drivers let pcmcia_request_irq install their interrupt handlers. sym53c500_cs requests its IRQ manually, but it cannot share an IRQ. The appended patch changes pcmcia_request_irq to pass an arbitrary, unique, non-NULL dev_info with the dummy handler. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton --- drivers/pcmcia/pcmcia_resource.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/pcmcia/pcmcia_resource.c~pcmcia-fix-sharing-irqs-and-request_irq-without-irq_handle_present drivers/pcmcia/pcmcia_resource.c --- devel/drivers/pcmcia/pcmcia_resource.c~pcmcia-fix-sharing-irqs-and-request_irq-without-irq_handle_present 2005-07-28 01:05:52.000000000 -0700 +++ devel-akpm/drivers/pcmcia/pcmcia_resource.c 2005-07-28 01:05:52.000000000 -0700 @@ -800,7 +800,7 @@ int pcmcia_request_irq(struct pcmcia_dev } else { int try; u32 mask = s->irq_mask; - void *data = NULL; + void *data = &p_dev->dev.driver; /* something unique to this device */ for (try = 0; try < 64; try++) { irq = try % 32; _