]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
PCI: Check for PCIe Link downtraining
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Mon, 6 Aug 2018 23:25:35 +0000 (18:25 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 10 Aug 2018 17:29:04 +0000 (12:29 -0500)
commit2d1ce5ec2117d16047334a1aa4b62e0cfb5a0605
tree61d71cf43436d8929699cb9032daa7ae623e87d0
parentaa667c6408d20a84c7637420bc3b7aa0abab59a2
PCI: Check for PCIe Link downtraining

When both ends of a PCIe Link are capable of a higher bandwidth than is
currently in use, the Link is said to be "downtrained".  A downtrained Link
may indicate hardware or configuration problems in the system, but it's
hard to identify such Links from userspace.

Refactor pcie_print_link_status() so it continues to always print PCIe
bandwidth information, as several NIC drivers desire.

Add a new internal __pcie_print_link_status() to emit a message only when a
device's bandwidth is constrained by the fabric and call it from the PCI
core for all devices, which identifies all downtrained Links.  It also
emits messages for a few cases that are technically not downtrained, such
as a x4 device in an open-ended x1 slot.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[bhelgaas: changelog, move __pcie_print_link_status() declaration to
drivers/pci/, rename pcie_check_upstream_link() to
pcie_report_downtraining()]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/probe.c