linux_dsm_epyc7002/drivers/net/ethernet/chelsio
Bjorn Helgaas 57d12fc6f7 cxgb4: Report PCIe link properties with pcie_print_link_status()
Previously the driver used pcie_get_minimum_link() to warn when the NIC
is in a slot that can't supply as much bandwidth as the NIC could use.

pcie_get_minimum_link() can be misleading because it finds the slowest link
and the narrowest link (which may be different links) without considering
the total bandwidth of each link.  For a path with a 16 GT/s x1 link and a
2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of
bandwidth, not the true available bandwidth of about 1969 MB/s for a
16 GT/s x1 link.

Use pcie_print_link_status() to report PCIe link speed and possible
limitations instead of implementing this in the driver itself.  This finds
the slowest link in the path to the device by computing the total bandwidth
of each link and compares that with the capabilities of the device.

The dmesg change is:

  - PCIe link speed is %s, device supports %s
  - PCIe link width is x%d, device supports x%d
  + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)

or, if the device is capable of better performance than is available in the
current slot:

  - A slot with more lanes and/or higher speed is suggested for optimal performance.
  + %u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2018-05-25 17:29:49 -05:00
..
cxgb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
cxgb3 ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
cxgb4 cxgb4: Report PCIe link properties with pcie_print_link_status() 2018-05-25 17:29:49 -05:00
cxgb4vf ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
libcxgb networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
Kconfig cxgb4: enable ZLIB_DEFLATE when building cxgb4 2018-01-24 10:56:59 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00