]> mj.ucw.cz Git - pciutils.git/commit
ls-tree: Do not read Primary Bus Number for PCI Bridges from PCI config space
authorPali Rohár <pali@kernel.org>
Mon, 17 Apr 2023 22:31:10 +0000 (00:31 +0200)
committerPali Rohár <pali@kernel.org>
Sat, 29 Apr 2023 12:14:58 +0000 (14:14 +0200)
commitc3c2e3cb3e5aa9882c5a7a76a482565990532e81
tree0801dc3c358fdf1258758abb3bb3085bbb9a41ce
parentf0aa3a466bc73d24d71dae7811cb673297fda752
ls-tree: Do not read Primary Bus Number for PCI Bridges from PCI config space

For PCIe devices of PCI Bridge type is Primary Bus Number not used and the
default value is 0. PCIe devices capture their Bus and Device numbers
automatically from PCIe TLP packets.

Instead of Primary Bus Number use Device Number because zero value confuse
tree building algorithm. Existing code already expects that Device Number
of PCI Bridge is already set to Primary Bus Number.
ls-tree.c