All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pci: Fix root port bus->self is NULL
@ 2014-01-07  8:04 ` Dongsheng Wang
  0 siblings, 0 replies; 24+ messages in thread
From: Dongsheng Wang @ 2014-01-07  8:04 UTC (permalink / raw)
  To: bhelgaas, rjw
  Cc: scottwood, galak, roy.zang, linux-pci, linuxppc-dev,
	Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@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.wang@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



^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-03-20  2:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07  8:04 [PATCH 1/2] pci: Fix root port bus->self is NULL Dongsheng Wang
2014-01-07  8:04 ` Dongsheng Wang
2014-01-07  8:04 ` [PATCH 2/2] fsl/pci: The new pci suspend/resume implementation Dongsheng Wang
2014-01-07  8:04   ` Dongsheng Wang
2014-01-07 20:41   ` Rafael J. Wysocki
2014-01-07 20:41     ` Rafael J. Wysocki
2014-01-08  7:12     ` Dongsheng.Wang
2014-01-08  7:12       ` Dongsheng.Wang
2014-01-21  5:40       ` Dongsheng.Wang
2014-01-21  5:40         ` Dongsheng.Wang
2014-03-19 21:00   ` [2/2] " Scott Wood
2014-03-19 21:00     ` Scott Wood
2014-03-20  2:25     ` Dongsheng.Wang
2014-03-20  2:25       ` Dongsheng.Wang
2014-01-07  8:27 ` [PATCH 1/2] pci: Fix root port bus->self is NULL Yijing Wang
2014-01-07  8:27   ` Yijing Wang
2014-01-07  8:54   ` Jiang Liu
2014-01-07  8:54     ` Jiang Liu
2014-01-07  9:51     ` Dongsheng.Wang
2014-01-07  9:51       ` Dongsheng.Wang
2014-01-08  2:33       ` Jiang Liu
2014-01-08  2:33         ` Jiang Liu
2014-01-08  3:51         ` Dongsheng.Wang
2014-01-08  3:51           ` Dongsheng.Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.