linux/drivers/pci/pcie
Qiang 3ad3f8ce50 PCI/PME: Handle invalid data when reading Root Status
PCIe PME and native hotplug share the same interrupt number, so hotplug
interrupts are also processed by PME.  In some cases, e.g., a Link Down
interrupt, a device may be present but unreachable, so when we try to
read its Root Status register, the read fails and we get all ones data
(0xffffffff).

Previously, we interpreted that data as PCI_EXP_RTSTA_PME being set, i.e.,
"some device has asserted PME," so we scheduled pcie_pme_work_fn().  This
caused an infinite loop because pcie_pme_work_fn() tried to handle PME
requests until PCI_EXP_RTSTA_PME is cleared, but with the link down,
PCI_EXP_RTSTA_PME can't be cleared.

Check for the invalid 0xffffffff data everywhere we read the Root Status
register.

1469d17dd3 ("PCI: pciehp: Handle invalid data when reading from
non-existent devices") added similar checks in the hotplug driver.

Signed-off-by: Qiang Zheng <zhengqiang10@huawei.com>
[bhelgaas: changelog, also check in pcie_pme_work_fn(), use "~0" to follow
other similar checks]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-11-07 18:38:47 -06:00
..
aer Merge branch 'pci/trivial' into next 2017-09-07 13:24:20 -05:00
aspm.c PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove 2017-03-07 14:23:30 -06:00
Kconfig PCI/ASPM: Add support for L1 substates 2017-02-14 17:43:51 -06:00
Makefile PCI: Add Precision Time Measurement (PTM) support 2016-08-15 13:44:08 -05:00
pcie-dpc.c PCI/DPC: Add local struct device pointers 2017-08-24 11:30:02 -05:00
pme.c PCI/PME: Handle invalid data when reading Root Status 2017-11-07 18:38:47 -06:00
portdrv_acpi.c Merge branches 'pci/dpc', 'pci/resource' and 'pci/thunderbolt' into next 2016-05-03 11:49:21 -05:00
portdrv_bus.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
portdrv_core.c PCI/portdrv: Allocate MSI/MSI-X vector for Downstream Port Containment 2017-06-16 19:19:28 -05:00
portdrv_pci.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
portdrv.h PCI/portdrv: Support multiple interrupts for MSI as well as MSI-X 2017-06-16 18:04:13 -05:00
ptm.c PCI: Add PTM clock granularity information 2016-08-25 08:32:34 -05:00