]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Report PCIe link properties with pcie_print_link_status()
authorBrian Maly <brian.maly@oracle.com>
Thu, 25 Oct 2018 20:50:38 +0000 (16:50 -0400)
committerBrian Maly <brian.maly@oracle.com>
Tue, 22 Jan 2019 19:24:35 +0000 (14:24 -0500)
commitf97bf23eeb0b95a0ff492dbb6af6c8a59c2354cf
tree75d0f81303b9bd8f93f5d46d6a115df1f9d12731
parent819549b9426212f975f67249249961447233cf26
bnxt_en: Report PCIe link properties with pcie_print_link_status()

Orabug: 28942099

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: Speed %s Width x%d
  + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
[backport of upstream commit af125b754e2f09e6061e65db8f4eda0f7730011d]

Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
[backport of UEK5 commit 48b32a7f2b4dddafbf42cde882c3c84c556fb477]
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
drivers/net/ethernet/broadcom/bnxt/bnxt_compat.c
drivers/net/ethernet/broadcom/bnxt/bnxt_compat.h

Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/Makefile
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_compat.c [new file with mode: 0644]
drivers/net/ethernet/broadcom/bnxt/bnxt_compat.h