Skip to contentSkip to conversation

idma64: Don't try to serve interrupts when device is powered off

PATCH New Andy Shevchenko 1 participant 1 message Mar 21, 2024

Subsystems (2)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

PATCH v2 1/1 idma64: Don't try to serve interrupts when device is powered off

When iDMA 64-bit device is powered off, the IRQ status register is all 1:s. This is never happen in real case and signalling that the device is simply powered off. Don't try to serve interrupts that are not ours.

Fixes 667dfed98615 ("dmaengine: add a driver for Intel integrated DMA 64-bit")

---
v2: added tag (Heiner), moved check to be before the debug message

 drivers/dma/idma64.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/idma64.c +4 -0
index 78a938969d7d..1398814d8fbb 100644
@@ -171,6 +171,10 @@ static irqreturn_t idma64_irq(int irq, void *dev)
 	u32 status_err;
 	unsigned short i;
 
+	/* Since IRQ may be shared, check if DMA controller is powered on */
+	if (status == GENMASK(31, 0))
+		return IRQ_NONE;
+
 	dev_vdbg(idma64->dma.dev, "%s: status=%#x\n", __func__, status);
 
 	/* Check if we have any interrupt from the DMA controller */
Signature · 1 line
2.43.0.rc1.1.gbec44491f096