PCI: add struct pci_host_bridge and a list of all bridges found

This adds a list of all PCI host bridges we find and a way to look up
the host bridge from a pci_dev.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Bjorn Helgaas
2012-02-23 20:18:59 -07:00
parent a5390aa6dc
commit 5a21d70dbd
2 changed files with 40 additions and 6 deletions

View File

@@ -368,6 +368,11 @@ static inline int pci_channel_offline(struct pci_dev *pdev)
return (pdev->error_state != pci_channel_io_normal);
}
struct pci_host_bridge {
struct list_head list;
struct pci_bus *bus; /* root bus */
};
/*
* The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
* to P2P or CardBus bridge windows) go in a table. Additional ones (for