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

On 2014/1/7 16:04, Dongsheng Wang wrote:
> 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;

In this case, bus is the pci root bus I think, so why set bus->self = root port ?
"bus->self" should pointer to the pci device that bridge out this bus.

> +
>  	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) {
> 


-- 
Thanks!
Yijing

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07  8:04 [PATCH 1/2] pci: Fix root port bus->self is NULL Dongsheng Wang
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 ` Yijing Wang [this message]
2014-01-07  8:54   ` [PATCH 1/2] pci: Fix root port bus->self is NULL 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=52CBBA86.7020401@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=dongsheng.wang@freescale.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).