linux/drivers/pci/pcie
Stuart Hayes 4d2bc69df9 PCI/portdrv: Enable Bandwidth Notification only if port supports it
commit 00823dcbdd415c868390feaca16f0265101efab4 upstream.

Previously we assumed that all Root Ports and Switch Downstream Ports
supported Link Bandwidth Notification.  Per spec, this is only required
for Ports supporting Links wider than x1 and/or multiple Link speeds
(PCIe r5.0, sec 7.5.3.6).

Because we assumed all Ports supported it, we tried to set up a Bandwidth
Notification IRQ, which failed for devices that don't support IRQs at all,
which meant pcieport didn't attach to the Port at all.

Check the Link Bandwidth Notification Capability bit and enable the service
only when the Port supports it.

[bhelgaas: commit log]
Fixes: e8303bb7a7 ("PCI/LINK: Report degraded links via link bandwidth notification")
Link: https://lore.kernel.org/r/20210512213314.7778-1-stuart.w.hayes@gmail.com
Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 12:26:22 +02:00
..
aer_inject.c
aer.c
aspm.c PCI/ASPM: Add missing newline in sysfs 'policy' 2020-08-19 08:16:13 +02:00
bw_notification.c
dpc.c
err.c
Kconfig
Makefile
pme.c
portdrv_core.c PCI/portdrv: Enable Bandwidth Notification only if port supports it 2021-09-22 12:26:22 +02:00
portdrv_pci.c
portdrv.h
ptm.c PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port 2020-06-24 17:50:31 +02:00