@@ -261,8 +261,7 @@ static irqreturn_t dra7xx_pcie_msi_irq_handler(int irq, void *arg)
reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI);
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI, reg);
- switch (reg) {
- case MSI:
+ if (reg & MSI) {
/*
* Need to make sure no MSI IRQs are pending before
* exiting handler, else the wrapper will not catch new
@@ -279,17 +278,13 @@ static irqreturn_t dra7xx_pcie_msi_irq_handler(int irq, void *arg)
reg);
return IRQ_HANDLED;
}
- break;
- case INTA:
- case INTB:
- case INTC:
- case INTD:
+ }
+ if (reg & LEG_EP_INTERRUPTS) {
for_each_set_bit(bit, ®, PCI_NUM_INTX) {
virq = irq_find_mapping(dra7xx->irq_domain, bit);
if (virq)
generic_handle_irq(virq);
}
- break;
}
return IRQ_HANDLED;
Currently, pci-dra7xx driver handles MSI and Legacy IRQs exclusive of each other. This is not true, as there maybe both legacy and MSI IRQs raised at the same time. Fix this by making sure that driver handles both MSI and legacy IRQs in the IRQ handler. Signed-off-by: Vignesh R <vigneshr@ti.com> --- drivers/pci/dwc/pci-dra7xx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)