linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dongsheng Wang <dongsheng.wang@freescale.com>
To: <bhelgaas@google.com>, <rjw@rjwysocki.net>
Cc: roy.zang@freescale.com, galak@codeaurora.org,
	Wang Dongsheng <dongsheng.wang@freescale.com>,
	linux-pci@vger.kernel.org, scottwood@freescale.com,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 1/2] pci: Fix root port bus->self is NULL
Date: Tue, 7 Jan 2014 16:04:07 +0800	[thread overview]
Message-ID: <1389081848-26506-1-git-send-email-dongsheng.wang@freescale.com> (raw)

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

             reply	other threads:[~2014-01-07  8:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07  8:04 Dongsheng Wang [this message]
2014-01-07  8:04 ` [PATCH 2/2] fsl/pci: The new pci suspend/resume implementation Dongsheng Wang
2014-01-07 20:41   ` Rafael J. Wysocki
2014-01-08  7:12     ` Dongsheng.Wang
2014-01-21  5:40       ` Dongsheng.Wang
2014-03-19 21:00   ` [2/2] " Scott Wood
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:54   ` Jiang Liu
2014-01-07  9:51     ` Dongsheng.Wang
2014-01-08  2:33       ` Jiang Liu
2014-01-08  3:51         ` Dongsheng.Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389081848-26506-1-git-send-email-dongsheng.wang@freescale.com \
    --to=dongsheng.wang@freescale.com \
    --cc=bhelgaas@google.com \
    --cc=galak@codeaurora.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rjw@rjwysocki.net \
    --cc=roy.zang@freescale.com \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).