Matthew Wilcox <matthew <at> wil.cx> writes: > > On Sat, May 02, 2009 at 11:57:57AM +0000, Lifesaver wrote: > > Matthew Wilcox <matthew <at> wil.cx> writes: > > > You need to be one level down ... stop before you reach bus->self == NULL. > > > > I am stopping before bus becomes null. which is why bus is not null, but > > bus->self is. I will try your suggestion tomorrow - stopping one level > > earlier. > > OK, given your explanation below, this isn't the right answer; you need > to stop when you get to a device which is in a slot; on machines with > deep PCIe hierarchies, you might find the wrong bus. > How about traversing thru the linked list pdev->bus_list or pdev->global_list Can I typecast individual entries as (struct pci_bus *) and find the root bus ID at the bridge? -- 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