[PATCH] Do not skip PCI Express to PCI bridge when scanning OF node

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE7090d

3 messages, 3 authors, 2007-03-08 · open the first message on its own page

[PATCH] Do not skip PCI Express to PCI bridge when scanning OF node

From: Jon Loeliger <hidden>
Date: 2007-03-07 18:35:44

From: Haiying Wang <redacted>

Signed-off-by: Zhang Wei <redacted>
Signed-off-by: Haiying Wang <redacted>
Signed-off-by: Jon Loeliger <redacted>
---
 arch/powerpc/kernel/prom_parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index ea6fd55..0809977 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -267,7 +267,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
 		ppdev = pdev->bus->self;
 
 		/* Ouch, it's a host bridge... */
-		if (ppdev == NULL) {
+		if (ppdev == NULL || ppdev->devfn == 0) {
 #ifdef CONFIG_PPC64
 			ppnode = pci_bus_to_OF_node(pdev->bus);
 #else
-- 
1.5.0.1.213.g509b

Re: [PATCH] Do not skip PCI Express to PCI bridge when scanning OF node

From: Kumar Gala <hidden>
Date: 2007-03-07 20:01:49

On Mar 7, 2007, at 12:35 PM, Jon Loeliger wrote:
From: Haiying Wang <redacted>

Signed-off-by: Zhang Wei <redacted>
Signed-off-by: Haiying Wang <redacted>
Signed-off-by: Jon Loeliger <redacted>
The signed-off-by's are out of order if this patch is really from  
Haiyang.

Also, I think a better description about why this was needed should  
be provided.  I'm guessing devices behind a PCI Ex to PCI bridge end  
up pdev->bus->self set?  Seems like a bug in the generic pci code.

- k

Re: [PATCH] Do not skip PCI Express to PCI bridge when scanning OF node

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-03-08 09:45:44

On Wed, 2007-03-07 at 12:35 -0600, Jon Loeliger wrote:
quoted hunk
From: Haiying Wang <redacted>

Signed-off-by: Zhang Wei <redacted>
Signed-off-by: Haiying Wang <redacted>
Signed-off-by: Jon Loeliger <redacted>
---
 arch/powerpc/kernel/prom_parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index ea6fd55..0809977 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -267,7 +267,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
 		ppdev = pdev->bus->self;
 
 		/* Ouch, it's a host bridge... */
-		if (ppdev == NULL) {
+		if (ppdev == NULL || ppdev->devfn == 0) {
No way. There is nothing "special" per spec with devfn == 0.

What exactly is that supposed to do ?

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help