Skip to content

Support for PROGIF, REVID and SUBSYS

Pali Rohár linux-pci 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5libpci: Add new options for pci_fill_info: PROGIF, REVID and SUBSYSlib/pci.h+6 -00 replies
2/5libpci: generic: Implement PROGIF, REVID and SUBSYS supportlib/generic.c+30 -10 replies
3/5libpci: generic: Implement SUBSYS also for PCI_HEADER_TYPE_BRIDGElib/generic.c+24 -03 replies
4/5libpci: sysfs: Implement PROGIF, REVID and SUBSYS supportlib/sysfs.c+36 -30 replies
5/5lspci: Retrieve prog if, subsystem ids and revision id via libpcils-kernel.c lspci.c lspci.h+27 -530 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH pciutils 0/5] Support for PROGIF, REVID and SUBSYS

libpci currently provides only access to bits [23:8] of class id via dev->device_class member. Remaining bits [7:0] of class id can be only accessed via reading config space.

lspci in some places reads class id from dev->device_class and on some places from config space because it does not have access to all class bits.

For some broken devices kernel reports different class id via sysfs as what is stored in device config space. Value reported by sysfs should be the correct one.

lspci has -b option (Bus-centric view) to choose if information from kernel or from config space should be showed. But this option is not respected on all places because of missing bits.

Same applies for vendor+device ids, subsystem ids and revision id.

Export all these information from sysfs via libpci API use it in lspci. With this change lspci should now respect -b option for all these information.

With this change are in libpci and lspci also available subsystem ids for PCI-to-PCI bridges.

This patch series is based on top of another patch series:
https://lore.kernel.org/linux-pci/[email protected]/

Pali Rohár (5):
libpci: Add new options for pci_fill_info: PROGIF, REVID and SUBSYS
libpci: generic: Implement PROGIF, REVID and SUBSYS support
libpci: generic: Implement SUBSYS also for PCI_HEADER_TYPE_BRIDGE
libpci: sysfs: Implement PROGIF, REVID and SUBSYS support
lspci: Retrieve prog if, subsystem ids and revision id via libpci

 lib/generic.c | 55 +++++++++++++++++++++++++++++++++++++++-
 lib/pci.h     |  6 +++++
 lib/sysfs.c   | 39 +++++++++++++++++++++++++---
 ls-kernel.c   |  8 +++---
 lspci.c       | 70 ++++++++++++++++++---------------------------------
 lspci.h       |  2 --
 6 files changed, 123 insertions(+), 57 deletions(-)
Signature · 1 line
2.20.1