On 07/16/2016 10:13 AM, John Stultz wrote:
From: Andy Green <andy.gr...@linaro.org>

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....@linaro.org>
Cc: Jingoo Han <jg1....@samsung.com>
Cc: Krzysztof Kozlowski <k.kozlow...@samsung.com>
Cc: Maxime Ripard <maxime.rip...@free-electrons.com>
Cc: Vinod Koul <vinod.k...@intel.com>
Cc: Dan Williams <dan.j.willi...@intel.com>
Cc: Liam Girdwood <lgirdw...@gmail.com>
Cc: Mark Brown <broo...@kernel.org>
Cc: Jaroslav Kysela <pe...@perex.cz>
Cc: Takashi Iwai <ti...@suse.com>
Cc: Wei Xu <xuw...@hisilicon.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Andy Green <a...@warmcat.com>
Cc: Dave Long <dave.l...@linaro.org>
Cc: Guodong Xu <guodong...@linaro.org>
Signed-off-by: Andy Green <andy.gr...@linaro.org>
[jstultz: Forward ported to mainline]
Signed-off-by: John Stultz <john.stu...@linaro.org>

Acked-by: Zhangfei Gao <zhangfei....@linaro.org>

---
  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)

Reply via email to