linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: "Dongsheng.Wang@freescale.com" <Dongsheng.Wang@freescale.com>,
	Yijing Wang <wangyijing@huawei.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Cc: Scott Wood <scottwood@freescale.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"galak@codeaurora.org" <galak@codeaurora.org>
Subject: Re: [PATCH 1/2] pci: Fix root port bus->self is NULL
Date: Wed, 08 Jan 2014 10:33:13 +0800	[thread overview]
Message-ID: <52CCB8E9.6020501@linux.intel.com> (raw)
In-Reply-To: <80033eb36b0f40d682aeecc8b99dbd95@BN1PR03MB188.namprd03.prod.outlook.com>



On 2014/1/7 17:51, Dongsheng.Wang@freescale.com wrote:
>>>> 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.
>> Yes, this patch seems wrong. If dev is root port, bus should be root bus, so we
>> shouldn't set root_bus->self = pci_dev_of_root_port.
>>
> Why the root bus->self pointer to the bridge?
> If child bus create from root bus, the child->self will get the bridge(root port) pci device.
> 
>> Actually PCI core has correctly setup pci_bus->self for secondary bus of PCIe
>> root port.
> Yes, right. But the root-bus->self is NULL. I think the root bus should get root port
> pci device for itself. If there is no bridge at board how to get the root port device?
Hi Dongsheng,
	PCI root bus represents PCI host bridge, which has no
corresponding PCI device.

> 
> -Dongsheng
> 
>>
>> Thanks!
>> Gerry
>>
> 

  reply	other threads:[~2014-01-08  2:33 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 ` [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 [this message]
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=52CCB8E9.6020501@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=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=scottwood@freescale.com \
    --cc=wangyijing@huawei.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).