From 94658a9fd0af2d4cb42ba3e1e8fa72d7541176c3 Mon Sep 17 00:00:00 2001 From: Harro Haan Date: Thu, 12 Dec 2013 19:29:03 +0100 Subject: PCI: designware: Fix missing MSI IRQs The interrupts were cleared after the IRQ handler was called. This means that new interrupts that occur after the handler handled the previous IRQ but before the interrupt is cleared will be missed. Tested-by: Marek Vasut Tested-by: Matthias Mann Signed-off-by: Harro Haan Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han Acked-by: Mohit Kumar Cc: Richard Zhu Cc: Shawn Guo Cc: Pratyush Anand Cc: Tim Harvey Cc: Juergen Beisert Cc: Arnd Bergmann Cc: Siva Reddy Kallam Cc: Srikanth T Shivanand Cc: Sean Cross The patch comes from: https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=ca1658921b63e5771423603367c5bee528acc977 Change-Id: I9f23d8e1d96d1e580d3efa43b755d9a79103217c Reviewed-on: http://git.am.freescale.net:8181/19686 Tested-by: Review Code-CDREVIEW Reviewed-by: Zhengxiong Jin diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 268e986..c954de6 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -167,11 +167,13 @@ void dw_handle_msi_irq(struct pcie_port *pp) while ((pos = find_next_bit(&val, 32, pos)) != 32) { irq = irq_find_mapping(pp->irq_domain, i * 32 + pos); + dw_pcie_wr_own_conf(pp, + PCIE_MSI_INTR0_STATUS + i * 12, + 4, 1 << pos); generic_handle_irq(irq); pos++; } } - dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, val); } } -- cgit v0.10.2