]> mj.ucw.cz Git - pciutils.git/commit
lspci: Show device name as exported by BIOS (sysfs label attribute) (V2)
authorThomas Renninger <trenn@suse.de>
Tue, 28 Jan 2014 07:51:02 +0000 (08:51 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 1 Nov 2014 15:20:48 +0000 (16:20 +0100)
commitaecf5b35e2b511ac6c7906207bca1a5b39721c84
tree2e6e2bd1673281e52a10762d476e078e6ed6510e
parent01de4db134c91b6e5ec8a8b85e574b1199dfbf03
lspci: Show device name as exported by BIOS (sysfs label attribute) (V2)

The Device name of a PCI or PCI Express device under OS may be exported via
ACPI _DSM function with function index 7.
This allows to connect a described PCI device in the platform documentation
or as labeled on the chassis with PCI devices shown via lspci.
The kernel already exports this string through sysfs under a PCI device through
the "label" sysfs attribute.

This patch reads the device name if available and shows it to the user.
Real world examples:
  Device Name: "USB HS EHCI Controller #2 #3"
  Device Name: "USB HS EHCI Controller #1"
  Device Name: "SATA Controller #1"
  Device Name: "Onboard LAN #1"
  Device Name: "Onboard LAN #2"
  Device Name: "Onboard Video (PILOT-3)"

Compare with PCI Firmware Spec v3.1 chapter 4.6.7 and
ACPI spec v5.0 chapter 9.14.1

The DeviceName is not shown by default, but starting from first verbose
parameter (-v).

V2: - Free label string if allocated
    - Enhance changelog

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: linux-pci@vger.kernel.org
lib/access.c
lib/pci.h
lib/sysfs.c
lspci.c