linux/drivers/pci/pcie
Lukas Wunner 55397ce8df PCI/LINK: Clear bandwidth notification interrupt before enabling it
When booting a MacBookPro9,1, duplicate link downtraining messages are
logged for the devices directly attached to the two CPU-internal Root Ports
of the Core i7 3615QM:  Once on device enumeration and once on enablement
of the bandwidth notification interrupt on the Root Ports.

Duplicate messages do not occur with Root Ports on the PCH and Downstream
Ports on the Thunderbolt controller:  Only a single message is logged for
these, namely on device enumeration.

The reason for the duplicate messages is a stale interrupt in the Link
Status register of the 3615QM's internal Root Ports.  Avoid by clearing the
interrupt before enabling it.

An alternative approach would be to clear the interrupt already on device
enumeration or to report link downtraining only if the speed has changed.
That way, link downtraining occurring between device enumeration and
enablement of the bandwidth notification interrupt could be caught.
However clearing stale interrupts before enabling them is a standard
operating procedure for any driver and keeping the two steps in one place
makes the code easier to follow.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alexandru Gagniuc <alex.gagniuc@dellteam.com>
2019-03-25 17:59:06 -05:00
..
aer_inject.c PCI/AER: Refactor error injection fallbacks 2018-10-18 19:43:19 -05:00
aer.c PCI/AER: Use match_string() helper to simplify the code 2019-01-29 16:32:17 -06:00
aspm.c pci-v4.21-changes 2019-01-05 17:57:34 -08:00
bw_notification.c PCI/LINK: Clear bandwidth notification interrupt before enabling it 2019-03-25 17:59:06 -05:00
dpc.c PCI/DPC: Fix print AER status in DPC event handling 2019-02-21 17:07:20 -06:00
err.c PCI/ERR: Remove duplicated include from err.c 2018-10-02 16:04:40 -05:00
Kconfig PCI: Update PCIEPORTBUS Kconfig help text 2019-03-06 15:00:09 -06:00
Makefile PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
pme.c PCI/PME: Fix possible use-after-free on remove 2019-03-01 17:45:27 -06:00
portdrv_core.c PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
portdrv_pci.c PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
portdrv.h PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00