k3dma: Fix "nobody cared" message seen on any error
authorAndy Green <andy.green@linaro.org>
Mon, 29 Aug 2016 17:30:49 +0000 (10:30 -0700)
committerVinod Koul <vinod.koul@intel.com>
Wed, 31 Aug 2016 04:39:32 +0000 (10:09 +0530)
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 <zhangfei.gao@linaro.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Forward ported to mainline]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/k3dma.c

index 7dc7816d2a0c6772d06141855802026ff9e2967f..f46b9b86fc9bb9de9ea940cbfae2115884edcce3 100644 (file)
@@ -221,11 +221,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)