Hello all,
Fallowing a Benjamin Herrenschmidt request, I sending you a fix for IRQ
assign for some PCIe devices. This bug affects multiple PCIe devices
including Cadet-E, Squib-E, CISCO 4X SDR IB, and Knox adapters.
The problem lays in the fact OF does not create an "interrupt" property
for some PCIe device (for instance
"[EMAIL PROTECTED]/pci1014\,[EMAIL PROTECTED]/", an IBM Raid Controller) and
the kernel code fails returning a IRQ 0 (invalid one) if this property
is not present.
This patch changes the way to map interrupts to if the code can not get
"interrupts" property from PCI OF node, it falls back to standard OF
parsing. I verified and it worked fine with a pair of Squib-E SAS
adapter on a P6-570.
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index bc1fb27..a11d689 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -250,8 +250,11 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
* parsing
*/
dn = pci_device_to_OF_node(pdev);
- if (dn)
- return of_irq_map_one(dn, 0, out_irq);
+ if (dn) {
+ rc = of_irq_map_one(dn, 0, out_irq);
+ if (!rc)
+ return rc;
+ }
/* Ok, we don't, time to have fun. Let's start by building up an
* interrupt spec. we assume #interrupt-cells is 1, which is standard
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev