Do not skip PCI Express to PCI bridge when scanning OF node
PATCH 1/1 Do not skip PCI Express to PCI bridge when scanning OF node
From: Haiying Wang <[email protected]>
Signed-off-by Zhang Wei <[email protected]>
Signed-off-by Haiying Wang <[email protected]>
Signed-off-by Jon Loeliger <[email protected]>
--- arch/powerpc/kernel/prom_parse.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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 ) {#ifdef CONFIG_PPC64 ppnode =pci_bus_to_OF_node (pdev->bus);#else
Signature · 1 line
1.5.0.1.213.g509b
Quoted 5 lines · Jon Loeliger
From: Haiying Wang <[email protected]>
Signed-off-by Zhang Wei <[email protected]>Signed-off-by Haiying Wang <[email protected]>Signed-off-by Jon Loeliger <[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
Quoted 14 lines · Jon Loeliger
From: Haiying Wang <[email protected]>
Signed-off-by Zhang Wei <[email protected]>Signed-off-by Haiying Wang <[email protected]>Signed-off-by Jon Loeliger <[email protected]>--- arch/powerpc/kernel/prom_parse.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/powerpc/kernel/prom_parse.c +0
-0
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.