Skip to content

Commit 279c240

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler()
Return IRQ_HANDLED from the i3c_hci_irq_handler() only if some INTR_STATUS bit was set or if DMA/PIO handler handled it. Currently it returns IRQ_HANDLED in case INTR_STATUS is zero and IO handler returns false. Which could be the case if interrupt comes from other device or is spurious. Reviewed-by: Frank Li <[email protected]> Signed-off-by: Jarkko Nikula <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent eeeec6c commit 279c240

File tree

1 file changed

+3
-3
lines changed
  • drivers/i3c/master/mipi-i3c-hci

1 file changed

+3
-3
lines changed

drivers/i3c/master/mipi-i3c-hci/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
594594

595595
if (val) {
596596
reg_write(INTR_STATUS, val);
597+
result = IRQ_HANDLED;
597598
}
598599

599600
if (val & INTR_HC_RESET_CANCEL) {
@@ -605,12 +606,11 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
605606
val &= ~INTR_HC_INTERNAL_ERR;
606607
}
607608

608-
hci->io->irq_handler(hci);
609+
if (hci->io->irq_handler(hci))
610+
result = IRQ_HANDLED;
609611

610612
if (val)
611613
dev_err(&hci->master.dev, "unexpected INTR_STATUS %#x\n", val);
612-
else
613-
result = IRQ_HANDLED;
614614

615615
return result;
616616
}

0 commit comments

Comments
 (0)