This change extends libpci and allows providers to fill parent pci_dev. This is useful to retrieve topology as it is reported by the system itself. --- lib/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pci.h b/lib/pci.h index c13387e2b4b1..de031f7a416b 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -148,6 +148,7 @@ struct pci_dev { u8 prog_if; /* Programming interface for device_class */ u8 rev_id; /* Revision id */ u16 subsys_vendor_id, subsys_id; /* Subsystem vendor id and subsystem id */ + struct pci_dev *parent; /* Parent device */ /* Fields used internally */ struct pci_access *access; @@ -217,6 +218,7 @@ char *pci_get_string_property(struct pci_dev *d, u32 prop) PCI_ABI; #define PCI_FILL_REVID 0x00040000 #define PCI_FILL_SUBSYS 0x00080000 #define PCI_FILL_DRIVER 0x00100000 +#define PCI_FILL_PARENT 0x00200000 void pci_setup_cache(struct pci_dev *, u8 *cache, int len) PCI_ABI; -- 2.20.1