* [PATCH] powerpc: Fix Maple secondary IDE interrupt
@ 2006-10-09 3:27 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2006-10-09 3:27 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
The IDE driver will pick up the PCI IRQ for both channels on Maple
despite the fact that it's in legacy mode. This works around it by
"hiding" the PCI IRQ of the AMD8111 IDE controller when it's configured
in legacy mode on the Maple platform, thus causing the driver to call
pci_get_legacy_ide_irq() which will return the correct interrupts for
both channels.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/arch/powerpc/platforms/maple/pci.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/maple/pci.c 2006-10-09 11:50:35.000000000 +1000
+++ linux-work/arch/powerpc/platforms/maple/pci.c 2006-10-09 12:02:06.000000000 +1000
@@ -516,8 +516,21 @@ void __init maple_pcibios_fixup(void)
dev->irq = irq_create_mapping(NULL, 1);
if (dev->irq != NO_IRQ)
set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
- } else
- pci_read_irq_line(dev);
+ continue;
+ }
+
+ /* Hide AMD8111 IDE interrupt when in legacy mode so
+ * the driver calls pci_get_legacy_ide_irq()
+ */
+ if (dev->vendor == PCI_VENDOR_ID_AMD &&
+ dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
+ (dev->class & 5) != 5) {
+ dev->irq = NO_IRQ;
+ continue;
+ }
+
+ /* For all others, map the interrupt from the device-tree */
+ pci_read_irq_line(dev);
}
DBG(" <- maple_pcibios_fixup\n");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-09 3:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 3:27 [PATCH] powerpc: Fix Maple secondary IDE interrupt Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).