aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-12-28 20:09:57 +0100
committerMartin Mares <mj@ucw.cz>2022-02-10 13:49:35 +0100
commit5e9714acb554052f45185fb1cc8246c864ef76dd (patch)
tree757b95fc5a26042c64b3dece5911d682331d564d
parentfb570ee3b622125ec1eebd87cd5f8253fd76ef43 (diff)
downloadpciutils-5e9714acb554052f45185fb1cc8246c864ef76dd.tar.gz
libpci: Add new option PCI_FILL_PARENT
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.
-rw-r--r--lib/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pci.h b/lib/pci.h
index 8d09915..3947fc1 100644
--- a/lib/pci.h
+++ b/lib/pci.h
@@ -147,6 +147,7 @@ struct pci_dev {
pciaddr_t bridge_flags[4]; /* PCI_IORESOURCE_* flags for bridge addresses */
u8 prog_if, rev_id; /* Programming interface for device_class and revision id */
u16 subsys_vendor_id, subsys_id; /* Subsystem vendor id and subsystem id */
+ struct pci_dev *parent; /* Parent device, does not have to be always accessible */
/* Fields used internally */
struct pci_access *access;
@@ -214,6 +215,7 @@ char *pci_get_string_property(struct pci_dev *d, u32 prop) PCI_ABI;
#define PCI_FILL_RESCAN 0x00010000
#define PCI_FILL_CLASS_EXT 0x00020000 /* prog_if and rev_id */
#define PCI_FILL_SUBSYS 0x00040000 /* subsys_vendor_id and subsys_id */
+#define PCI_FILL_PARENT 0x00080000
void pci_setup_cache(struct pci_dev *, u8 *cache, int len) PCI_ABI;