diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-07-28 08:07:27 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 15:39:01 (GMT) |
commit | a1b274fbe3f00469fb8a68806469ec7746c7f648 (patch) | |
tree | 1c7701d1d9d8ec9dd6ff0d692501e6850032abef /drivers/pcmcia/pcmcia_resource.c | |
parent | 661d04c6f08c16ae63fb3be05d59ee99c6f3de52 (diff) | |
download | linux-a1b274fbe3f00469fb8a68806469ec7746c7f648.tar.xz |
[PATCH] pcmcia: fix sharing IRQs and request_irq without IRQ_HANDLE_PRESENT
Debugging and description from: Noah Misch <noah@cs.caltech.edu>
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 <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 184f4f8..6f9fdb2 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -800,7 +800,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) } 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; |