PCI: Add sysfs max_link_speed/width, current_link_speed/width, etc
authorWong Vee Khee <vee.khee.wong@ni.com>
Thu, 1 Jun 2017 09:43:06 +0000 (17:43 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 19 Jun 2017 21:54:53 +0000 (16:54 -0500)
commit56c1af4606f04048e3ae9ab2027a708b9684ff37
tree4797daa24a91f388a42b95c1cd5568507ca1c1e7
parent99b3c58f7ba7fae801e501b45c5fcf6e08d9247f
PCI: Add sysfs max_link_speed/width, current_link_speed/width, etc

Expose PCIe bridges attributes such as secondary bus number, subordinate
bus number, max link speed and link width, current link speed and link
width via sysfs in /sys/bus/pci/devices/...

This information is available via lspci, but that requires root privilege.

Signed-off-by: Wong Vee Khee <vee.khee.wong@ni.com>
Signed-off-by: Hui Chun Ong <hui.chun.ong@ni.com>
[bhelgaas: changelog, return errors early to unindent usual case, return
errors with same style throughout]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-sysfs.c
include/uapi/linux/pci_regs.h