From: Keith Busch Date: Fri, 28 Apr 2017 16:02:48 +0000 (-0400) Subject: PCI/DPC: Skip DPC event if device is not present X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=993d668183fa49b63939a4f62a558d487fd50c22;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Bjorn Helgaas --- 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",