The patch titled pcmcia IRQ debugging has been added to the -mm tree. Its filename is pcmcia-irq-debugging.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Clean up the pcmcia code a bit on the IRQ side (I did this while debugging the problem just so I could read wtf it was doing), and also adds a warning and passes back the correct information when a device asks for exclusive but gets given shared. This at least means the dmesg dump of a problem triggered by this will have a signature to find. Signed-off-by: Alan Cox <alan@xxxxxxxxxx> Cc: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/pcmcia/pcmcia_resource.c | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff -puN drivers/pcmcia/pcmcia_resource.c~pcmcia-irq-debugging drivers/pcmcia/pcmcia_resource.c --- devel/drivers/pcmcia/pcmcia_resource.c~pcmcia-irq-debugging 2006-05-17 23:01:22.000000000 -0700 +++ devel-akpm/drivers/pcmcia/pcmcia_resource.c 2006-05-17 23:01:22.000000000 -0700 @@ -788,6 +788,7 @@ int pcmcia_request_irq(struct pcmcia_dev struct pcmcia_socket *s = p_dev->socket; config_t *c; int ret = CS_IN_USE, irq = 0; + int type; if (!(s->state & SOCKET_PRESENT)) return CS_NO_CARD; @@ -797,6 +798,13 @@ int pcmcia_request_irq(struct pcmcia_dev if (c->state & CONFIG_IRQ_REQ) return CS_IN_USE; + /* Decide what type of interrupt we are registering */ + type = 0; + if (s->functions > 1) /* All of this ought to be handled higher up */ + type = SA_SHIRQ; + if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) + type = SA_SHIRQ; + #ifdef CONFIG_PCMCIA_PROBE if (s->irq.AssignedIRQ != 0) { /* If the interrupt is already assigned, it must be the same */ @@ -822,9 +830,7 @@ int pcmcia_request_irq(struct pcmcia_dev * marked as used by the kernel resource management core */ ret = request_irq(irq, (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, - ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || - (s->functions > 1) || - (irq == s->pci_irq)) ? SA_SHIRQ : 0, + type, p_dev->devname, (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); if (!ret) { @@ -839,18 +845,21 @@ int pcmcia_request_irq(struct pcmcia_dev if (ret && !s->irq.AssignedIRQ) { if (!s->pci_irq) return ret; + type = SA_SHIRQ; irq = s->pci_irq; } - if (ret && req->Attributes & IRQ_HANDLE_PRESENT) { - if (request_irq(irq, req->Handler, - ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || - (s->functions > 1) || - (irq == s->pci_irq)) ? SA_SHIRQ : 0, - p_dev->devname, req->Instance)) + if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) { + if (request_irq(irq, req->Handler, type, p_dev->devname, req->Instance)) return CS_IN_USE; } + /* Make sure the fact the request type was overridden is passed back */ + if (type == SA_SHIRQ && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { + req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; + printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); + printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n"); + } c->irq.Attributes = req->Attributes; s->irq.AssignedIRQ = req->AssignedIRQ = irq; s->irq.Config++; _ Patches currently in -mm which might be from alan@xxxxxxxxxxxxxxxxxxx are origin.patch powerpc-fix-ide-pmac-sysfs-entry.patch fix-broken-pio-with-libata.patch git-libata-all.patch pcmcia-irq-debugging.patch megaraid-gcc-41-warning-fix.patch more-bug_on-conversion.patch ide-pdc202xx_oldc-remove-unneeded-tuneproc-call.patch ide-claim-extra-dma-ports-regardless-of-channel.patch ide-remove-dma_base2-field-form-ide_hwif_t.patch ide-always-release-dma-engine.patch ide-error-handling-fixes.patch ide-hpt3xxn-clocking-fixes.patch ide-io-increase-timeout-value-to-allow-for-slave-wakeup.patch ide-actually-honor-drives-minimum-pio-dma-cycle-times.patch ide-fix-hpt37x-timing-tables.patch ide-optimize-hpt37x-timing-tables.patch ide-fix-hpt3xx-hotswap-support.patch ide-fix-the-case-of-multiple-hpt3xx-chips-present.patch ide-hpt3xx-fix-pci-clock-detection.patch ide-pdc202xx_old-remove-the-obsolete-busproc.patch piix-fix-82371mx-enablebits.patch piix-remove-check-for-broken-mw-dma-mode-0.patch piix-slc90e66-pio-mode-fallback-fix.patch make-number-of-ide-interfaces-configurable.patch ide_dma_speed-fixes.patch ide_dma_speed-fixes-warning-fix.patch ide_dma_speed-fixes-tidy.patch revert-tty-buffering-comment-out-debug-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html