From: Wang Dongsheng <dongsheng.w...@freescale.com>

the root port bus->self always NULL, so put root port pci device
into root port bus->self.

Signed-off-by: Wang Dongsheng <dongsheng.w...@freescale.com>

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 38e403d..7f2d1ab 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1472,6 +1472,9 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)
        if (!dev->is_added)
                nr++;
 
+       if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
+               bus->self = dev;
+
        for (fn = next_fn(bus, dev, 0); fn > 0; fn = next_fn(bus, dev, fn)) {
                dev = pci_scan_single_device(bus, devfn + fn);
                if (dev) {
-- 
1.8.5


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to