aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>2016-09-01 06:14:42 -0400
committerBjorn Helgaas <bhelgaas@google.com>2016-09-13 11:38:19 -0400
commit3cd049ab9edd48a41955b8d05f0bc57ead918456 (patch)
tree8c02857a2f569c5a83e97f5626242b8185d97178
parentb584fa1fde71aa57fb63d32f66ff6c192ff7f2c5 (diff)
PCI: xilinx: Clear interrupt register for invalid interrupt
The interrupt decode register is not being cleared if an invalid interrupt arises. Clear the decode register in this case. Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--drivers/pci/host/pcie-xilinx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index bd646772b001..de1c758d17d7 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -434,7 +434,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data)
434 /* Check whether interrupt valid */ 434 /* Check whether interrupt valid */
435 if (!(val & XILINX_PCIE_RPIFR1_INTR_VALID)) { 435 if (!(val & XILINX_PCIE_RPIFR1_INTR_VALID)) {
436 dev_warn(port->dev, "RP Intr FIFO1 read error\n"); 436 dev_warn(port->dev, "RP Intr FIFO1 read error\n");
437 return IRQ_HANDLED; 437 goto error;
438 } 438 }
439 439
440 if (!(val & XILINX_PCIE_RPIFR1_MSI_INTR)) { 440 if (!(val & XILINX_PCIE_RPIFR1_MSI_INTR)) {
@@ -456,7 +456,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data)
456 456
457 if (!(val & XILINX_PCIE_RPIFR1_INTR_VALID)) { 457 if (!(val & XILINX_PCIE_RPIFR1_INTR_VALID)) {
458 dev_warn(port->dev, "RP Intr FIFO1 read error\n"); 458 dev_warn(port->dev, "RP Intr FIFO1 read error\n");
459 return IRQ_HANDLED; 459 goto error;
460 } 460 }
461 461
462 if (val & XILINX_PCIE_RPIFR1_MSI_INTR) { 462 if (val & XILINX_PCIE_RPIFR1_MSI_INTR) {
@@ -501,6 +501,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data)
501 if (status & XILINX_PCIE_INTR_MST_ERRP) 501 if (status & XILINX_PCIE_INTR_MST_ERRP)
502 dev_warn(port->dev, "Master error poison\n"); 502 dev_warn(port->dev, "Master error poison\n");
503 503
504error:
504 /* Clear the Interrupt Decode register */ 505 /* Clear the Interrupt Decode register */
505 pcie_write(port, status, XILINX_PCIE_REG_IDR); 506 pcie_write(port, status, XILINX_PCIE_REG_IDR);
506 507