Re: One chart on pci bridge and its bus and their children

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 05, 2012 at 10:41:39PM +0800, Jiang Liu wrote:
> On 06/05/2012 02:35 PM, Ram Pai wrote:
> > On Mon, Jun 04, 2012 at 10:20:51PM -0700, Yinghai Lu wrote:
> >> On Mon, Jun 4, 2012 at 10:18 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> >>> On Mon, Jun 4, 2012 at 9:37 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> >>>> That's true, but I don't think it answers the question.  If we have:
> >>>>
> >>>>    pci_bus->bridge == pci_bus->self->dev
> >>>>
> >>>> why would we need both "self" and "bridge"?  It would be interesting
> >>>> to try to remove "bridge" and replace uses of it with "self->dev".
> >>>
> >>> then how about root bus?
> >>>
> >>> root bus ->self should be NULL.
> >>>
> >>> root bus ->bridge is to the hostbridge->dev.
> > 
> > Yinghai,
> > 
> > is there a reason why this can't be fixed in
> > pci_create_root_bus() by having
> >    bus->self = bridge; /* 'bridge' is the pci_device of the corresponding host bridge */
> Hi Ram,
> 	A host bridge has no associated pci_device because it's out of the
> PCI domain. PCI domain only covers the hierarchy starting from the host bridge,
> but doesn't include the host bridge itself.

That makes it even easier to kill pci_bus->bridge.

for non-root buses, we can access the bridge's device using
bus->self->dev and for root bridges we can silently ignore
the bridge's dev since we know that it does not exist; because
pci_bus->self is null.

No?
RP

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux