diff options
author | Pali Rohár <pali@kernel.org> | 2021-12-28 20:14:47 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2022-02-10 13:49:35 +0100 |
commit | 67954c8b6514859a0e115538200187f3a1ffd366 (patch) | |
tree | 0e74cc2b7c3b384146340eb52fa069d698345f8a /lspci.c | |
parent | e9e7fab13d16067658f02d47094a949f56aef596 (diff) | |
download | pciutils-67954c8b6514859a0e115538200187f3a1ffd366.tar.gz |
lspci: Build tree based on PCI_FILL_PARENT information
Topology reported by system (libpci provider) may be different from
topology built based on primary/secondary/subordinate numbers from PCI
bridges by lspci.
This happens for example when some non-compliant PCI-to-PCI bridge
with Type 0 header (e.g. Marvell one) is available in the system.
So add additional edges reported by libpci when building tree in lspci.
Diffstat (limited to 'lspci.c')
-rw-r--r-- | lspci.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,7 +143,7 @@ scan_device(struct pci_dev *p) d->config_cached += 64; } pci_setup_cache(p, d->config, d->config_cached); - pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_CLASS_EXT | PCI_FILL_SUBSYS); + pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_CLASS_EXT | PCI_FILL_SUBSYS | (need_topology ? PCI_FILL_PARENT : 0)); return d; } |