Skip to contentSkip to conversation

Do not skip PCI Express to PCI bridge when scanning OF node

PATCH In review Jon Loeliger 3 participants 3 messages Mar 7, 2007 – Mar 8, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not skip PCI Express to PCI bridge when scanning OF node

From: Haiying Wang <[email protected]>

---
 arch/powerpc/kernel/prom_parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/prom_parse.c +1 -1
index ea6fd55..0809977 100644
@@ -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
Signature · 1 line
1.5.0.1.213.g509b
#1 lore raw
Quoted 5 lines · Jon Loeliger

From: Haiying Wang <[email protected]>

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

#2 lore raw
In reply to Jon Loeliger
Quoted 14 lines · Jon Loeliger

From: Haiying Wang <[email protected]>

---
 arch/powerpc/kernel/prom_parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/prom_parse.c +0 -0
index ea6fd55..0809977 100644

arch/powerpc/kernel/prom_parse.c int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) · line 270

Quoted 5 lines
arch/powerpc/kernel/prom_parse.c +1 -1
@@ -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.