* [PATCH] IRQ assign for some PCIe devices
@ 2008-11-19 13:55 Adhemerval Zanella
2008-11-20 2:26 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Adhemerval Zanella @ 2008-11-19 13:55 UTC (permalink / raw)
To: ppc-dev
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
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
"pci\@800000020000204/pci1014\,0339\@0/", 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.
[-- Attachment #2: ppc64_irq_assign.patch --]
[-- Type: text/x-patch, Size: 607 bytes --]
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IRQ assign for some PCIe devices
2008-11-19 13:55 [PATCH] IRQ assign for some PCIe devices Adhemerval Zanella
@ 2008-11-20 2:26 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2008-11-20 2:26 UTC (permalink / raw)
To: Adhemerval Zanella; +Cc: ppc-dev, Paul Mackerras
On Wed, 2008-11-19 at 11:55 -0200, Adhemerval Zanella wrote:
>
> 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.
Thanks for tracking this down !
We'll pick it up. In the future, it would be nice if you could post
the patch inline rather than as an attachment (you may want to train
via private email to make sure you get the right settings in your
mailer to avoid damaging it since some mailers love to mangle patches)
and with the appropriate "Signed-off-by:..." line.
The patch is correct, Paul, can you pick it up ?
Cheers,
Ben.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-20 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 13:55 [PATCH] IRQ assign for some PCIe devices Adhemerval Zanella
2008-11-20 2:26 ` 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).