diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-11-14 21:11:22 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-11-14 21:11:22 +0300 |
commit | 65a129d7847e4f5b24c6e56ab49090b1f6d0f3dc (patch) | |
tree | bd99baf5e2a8658a1af86a3a2a1d8f128638d3aa /drivers/pci/pcie | |
parent | 8d666e53e07ac4562eb8ef73c1904d88522fcb8b (diff) | |
parent | 505fb74664d534618258f4120d7e110a8b885c87 (diff) | |
download | linux-65a129d7847e4f5b24c6e56ab49090b1f6d0f3dc.tar.xz |
Merge branch 'pci/misc' into next
* pci/misc:
PCI: Fix kernel-doc build warning
PCI: Move PCI_QUIRKS to the PCI bus menu
alpha/PCI: Make pdev_save_srm_config() static
PCI: Remove unused declarations
PCI: Remove redundant pci_dev, pci_bus, resource declarations
PCI: Remove redundant pcibios_set_master() declarations
PCI/PME: Handle invalid data when reading Root Status
x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst
PCI: Constify pci_dev_type structure
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/pme.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index fafdb165dd2e..df290aa58dce 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c @@ -226,6 +226,9 @@ static void pcie_pme_work_fn(struct work_struct *work) break; pcie_capability_read_dword(port, PCI_EXP_RTSTA, &rtsta); + if (rtsta == (u32) ~0) + break; + if (rtsta & PCI_EXP_RTSTA_PME) { /* * Clear PME status of the port. If there are other @@ -273,7 +276,7 @@ static irqreturn_t pcie_pme_irq(int irq, void *context) spin_lock_irqsave(&data->lock, flags); pcie_capability_read_dword(port, PCI_EXP_RTSTA, &rtsta); - if (!(rtsta & PCI_EXP_RTSTA_PME)) { + if (rtsta == (u32) ~0 || !(rtsta & PCI_EXP_RTSTA_PME)) { spin_unlock_irqrestore(&data->lock, flags); return IRQ_NONE; } |