Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1458339

[PATCH 4/7] k3dma: Fix "nobody cared" message seen on any error

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 4/7] k3dma: Fix "nobody cared" message seen on any error
Date 2016-08-09 02:20 +0200
Message-ID <s42VX-7N-13@gated-at.bofh.it> (permalink)
References <s42VX-7N-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Andy Green <andy.green@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.gao@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>
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>
---
 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 7dc7816..f46b9b8 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -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)
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7 v4] K3DMA fixes for HiKey HDMI audio John Stultz <john.stultz@linaro.org> - 2016-08-09 02:20 +0200
  [PATCH 4/7] k3dma: Fix "nobody cared" message seen on any error John Stultz <john.stultz@linaro.org> - 2016-08-09 02:20 +0200
  [PATCH 6/7] k3dma: Fix memory handling in preparation for cyclic mode John Stultz <john.stultz@linaro.org> - 2016-08-09 02:20 +0200
  [PATCH 1/7] Kconfig: Allow k3dma driver to be selected for more then HISI3xx platforms John Stultz <john.stultz@linaro.org> - 2016-08-09 02:20 +0200
  [PATCH 5/7] k3dma: Fix occasional DMA ERR issue by using proper dma api John Stultz <john.stultz@linaro.org> - 2016-08-09 02:20 +0200

csiph-web