]> mj.ucw.cz Git - pciutils.git/commit
lspci: Retrieve prog if, subsystem ids and revision id via libpci
authorPali Rohár <pali@kernel.org>
Mon, 20 Dec 2021 21:39:42 +0000 (22:39 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 10 Feb 2022 12:49:35 +0000 (13:49 +0100)
commitfb570ee3b622125ec1eebd87cd5f8253fd76ef43
treefaf3052f9faad8810f45ba41f0c6349046067517
parenta936caf6afaff3424aebf2d33568df5b7e38498c
lspci: Retrieve prog if, subsystem ids and revision id via libpci

Use pci_fill_info with CLASS_EXT and SUBSYS to fill this information.

lspci in some places reads class from what libpci provider fills in
dev->device_class and in some other places it reads directly from config
space. In dev->device_class is stored class possible different class as in
config space (e.g. if kernel is fixing class because device has bogus
information stored in config space).

With this change is class always read from dev->device_class which reflects
and respects lspci -b option (Bus-centric view). Same applies for subsystem
ids and revision id (note that prog if is part of class).
ls-kernel.c
lspci.c
lspci.h