From: Daniel Ritz Date: Fri, 9 Sep 2005 20:03:25 +0000 (-0700) Subject: [PATCH] fix pcmcia_request_irq() for multifunction card X-Git-Tag: v2.6.16.28-rc1~4158 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c181e0e00ff778623c7fda055fd404a06d2c7845;p=karo-tx-linux.git [PATCH] fix pcmcia_request_irq() for multifunction card multifunction cards need to have the same irq assigned to both functions. the code tries that but fails because ret is still set to CS_IN_USE which results in the function having the CB irq assigned. yenta_set_socket then just changes the irq routing to use the PCI interrupt but the first functions irq handler is registered on an ISA interrupt. boom. Signed-off-by: Daniel Ritz Cc: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 599b116d9747..c0f4eb49177b 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -832,7 +832,8 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) } } #endif - if (ret) { + /* only assign PCI irq if no IRQ already assigned */ + if (ret && !s->irq.AssignedIRQ) { if (!s->pci_irq) return ret; irq = s->pci_irq;