]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/LINK: Report degraded links via link bandwidth notification
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Wed, 27 Feb 2019 20:58:17 +0000 (14:58 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 5 Mar 2019 21:04:13 +0000 (15:04 -0600)
commit7e51cb812df0c5bdaa0365c503e66a0aaba7fd34
tree191bc959359be088dc553e69b45d82c3d4a96ff9
parent9ad24840ab8a3ff1bd049995121b24b823bd998a
PCI/LINK: Report degraded links via link bandwidth notification

A warning is generated when a PCIe device is probed with a degraded link,
but there was no similar mechanism to warn when the link becomes degraded
after probing.  The Link Bandwidth Notification provides this mechanism.

Use the Link Bandwidth Management Interrupt to detect bandwidth changes,
and rescan the bandwidth, looking for the weakest point.  This is the same
logic used in probe().

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
drivers/pci/pcie/Makefile
drivers/pci/pcie/bw_notification.c [new file with mode: 0644]
drivers/pci/pcie/portdrv.h
drivers/pci/pcie/portdrv_core.c
drivers/pci/pcie/portdrv_pci.c