summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/pci.h
diff options
context:
space:
mode:
authorQiang <zhengqiang10@huawei.com>2017-09-28 05:54:34 +0200
committerBjorn Helgaas <bhelgaas@google.com>2017-11-08 01:38:47 +0100
commit3ad3f8ce50914288731a3018b27ee44ab803e170 (patch)
treecda2e47477e1296ce050ba71fea678b141c3799c /arch/mips/include/asm/pci.h
parentx86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst (diff)
downloadlinux-3ad3f8ce50914288731a3018b27ee44ab803e170.tar.xz
linux-3ad3f8ce50914288731a3018b27ee44ab803e170.zip
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. 1469d17dd341 ("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>
Diffstat (limited to 'arch/mips/include/asm/pci.h')
0 files changed, 0 insertions, 0 deletions