On Wed, Apr 25, 2012 at 9:21 AM, Wei Yang <weiyang.kernel@xxxxxxxxx> wrote: > I go through the code and curious about the value of pci_bus.primary > of Bus#0, the root bus. There is no such thing as "the root bus." There may be many root buses. > On x86, the root bus is get by, > root->bus = pci_acpi_scan_root(root); > > While I scan the code not find some place set the *primary* field. > > I think this value indicate the upstream bus number, while for root > bus, this value should be? > So this value of the root bus is any value? Or some restriction? The primary/secondary/subordinate fields in struct pci_bus are really properties of the upstream P2P bridge. Primary is the bus number of the P2P bridge primary (upstream) interface. In the case of a "root bus," i.e., the bus immediately below a PCI host bridge, there is no upstream P2P bridge, so primary is meaningless. Bjorn -- 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