linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
To: ppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH] IRQ assign for some PCIe devices
Date: Wed, 19 Nov 2008 11:55:35 -0200	[thread overview]
Message-ID: <49241AD7.3060201@linux.vnet.ibm.com> (raw)

[-- 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

             reply	other threads:[~2008-11-19 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 13:55 Adhemerval Zanella [this message]
2008-11-20  2:26 ` [PATCH] IRQ assign for some PCIe devices Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49241AD7.3060201@linux.vnet.ibm.com \
    --to=azanella@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).