From: Andy Green <[email protected]>

As it was before, as soon as the DMAC IP felt there was an error
he would return IRQ_NONE since no actual transfer had completed.

After spinning on that for 100K interrupts, Linux yanks the IRQ with
a "nobody cared" error.

This patch lets it handle the interrupt and keep the IRQ alive.

Cc: Zhangfei Gao <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Wei Xu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Andy Green <[email protected]>
Cc: Dave Long <[email protected]>
Cc: Guodong Xu <[email protected]>
Signed-off-by: Andy Green <[email protected]>
[jstultz: Forward ported to mainline]
Signed-off-by: John Stultz <[email protected]>
---
 drivers/dma/k3dma.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index 8dd050c..c2906a82 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -220,11 +220,13 @@ static irqreturn_t k3_dma_int_handler(int irq, void 
*dev_id)
        writel_relaxed(err1, d->base + INT_ERR1_RAW);
        writel_relaxed(err2, d->base + INT_ERR2_RAW);
 
-       if (irq_chan) {
+       if (irq_chan)
                tasklet_schedule(&d->task);
+
+       if (irq_chan || err1 || err2)
                return IRQ_HANDLED;
-       } else
-               return IRQ_NONE;
+
+       return IRQ_NONE;
 }
 
 static int k3_dma_start_txd(struct k3_dma_chan *c)
-- 
1.9.1

Reply via email to