summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-03-21 15:04:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-02 17:17:14 +0300
commitffe3f362de3479f5d75a97a7004a279a650ee7cd (patch)
tree3c1ef50a6b2b3739736b4663bbb9aab3119a6bb0
parent2628eb4bcc87953b3d10b5babde75853f38ad8fe (diff)
downloadlinux-ffe3f362de3479f5d75a97a7004a279a650ee7cd.tar.xz
idma64: Don't try to serve interrupts when device is powered off
[ Upstream commit 9140ce47872bfd89fca888c2f992faa51d20c2bc ] 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") Reported-by: Heiner Kallweit <hkallweit1@gmail.com> Closes: https://lore.kernel.org/r/700bbb84-90e1-4505-8ff0-3f17ea8bc631@gmail.com Tested-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240321120453.1360138-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/dma/idma64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index 89c5e5b46068..920e98dc7113 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -172,6 +172,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 */