summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2017-04-28 12:02:48 -0400
committerBjorn Helgaas <bhelgaas@google.com>2017-05-22 18:42:02 -0500
commit993d668183fa49b63939a4f62a558d487fd50c22 (patch)
tree7cd6063f0953d50912fc4ef214e30dbcff46260d /drivers/pci/pcie
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-993d668183fa49b63939a4f62a558d487fd50c22.tar.gz
linux-993d668183fa49b63939a4f62a558d487fd50c22.tar.bz2
linux-993d668183fa49b63939a4f62a558d487fd50c22.zip
PCI/DPC: Skip DPC event if device is not present
The DPC interupt may be executed on a device that is being removed. Skip queuing event handling if the status is all 1's, which should be seen only if the device is not present. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/pcie-dpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 77d2ca99d2ec..0bf084357237 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -92,7 +92,7 @@ static irqreturn_t dpc_irq(int irq, void *context)
pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS, &status);
pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_SOURCE_ID,
&source);
- if (!status)
+ if (!status || status == (u16)(~0))
return IRQ_NONE;
dev_info(&dpc->dev->device, "DPC containment event, status:%#06x source:%#06x\n",