PCI/DPC: Fix INT legacy interrupt in dpc_irq

Message ID 1517415535-21850-1-git-send-email-poza@codeaurora.org
State New
Headers show
Series
  • PCI/DPC: Fix INT legacy interrupt in dpc_irq
Related show

Commit Message

Oza Pawandeep Jan. 31, 2018, 4:18 p.m.
Current dpc driver acknowledge the interrupt in deferred work, which works
okay since LPI are edge triggered.
But when RP does not have MSI support, port service driver falls back to
legacy GIC SPI interrupts, and with current code we do not acknowledge the
interrupt and we get dpc interrupt storm.
This patch acknowledges the interrupt in interrupt handler.

Signed-off-by: Oza Pawandeep <poza@codeaurora.org>

Comments

Keith Busch Jan. 31, 2018, 4:28 p.m. | #1
On Wed, Jan 31, 2018 at 09:48:55PM +0530, Oza Pawandeep wrote:
> Current dpc driver acknowledge the interrupt in deferred work, which works
> okay since LPI are edge triggered.
> But when RP does not have MSI support, port service driver falls back to
> legacy GIC SPI interrupts, and with current code we do not acknowledge the
> interrupt and we get dpc interrupt storm.
> This patch acknowledges the interrupt in interrupt handler.
> 
> Signed-off-by: Oza Pawandeep <poza@codeaurora.org>

Thanks, looks good to me.

Reviewed-by: Keith Busch <keith.busch@intel.com>

Patch

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 2d976a6..570b561 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -134,7 +134,7 @@  static void interrupt_event_handler(struct work_struct *work)
 	}
 
 	pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS,
-		PCI_EXP_DPC_STATUS_TRIGGER | PCI_EXP_DPC_STATUS_INTERRUPT);
+			      PCI_EXP_DPC_STATUS_TRIGGER);
 }
 
 static void dpc_rp_pio_print_tlp_header(struct device *dev,
@@ -277,6 +277,8 @@  static irqreturn_t dpc_irq(int irq, void *context)
 
 		schedule_work(&dpc->work);
 	}
+	pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS,
+			      PCI_EXP_DPC_STATUS_INTERRUPT);
 	return IRQ_HANDLED;
 }