]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jul 2019 12:43:51 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jul 2019 12:43:51 +0000 (14:43 +0200)
added patches:
dmaengine-imx-sdma-remove-bd_intr-for-channel0.patch

queue-4.4/dmaengine-imx-sdma-remove-bd_intr-for-channel0.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/dmaengine-imx-sdma-remove-bd_intr-for-channel0.patch b/queue-4.4/dmaengine-imx-sdma-remove-bd_intr-for-channel0.patch
new file mode 100644 (file)
index 0000000..912db32
--- /dev/null
@@ -0,0 +1,54 @@
+From 3f93a4f297961c12bb17aa16cb3a4d1291823cae Mon Sep 17 00:00:00 2001
+From: Robin Gong <yibin.gong@nxp.com>
+Date: Fri, 21 Jun 2019 16:23:06 +0800
+Subject: dmaengine: imx-sdma: remove BD_INTR for channel0
+
+From: Robin Gong <yibin.gong@nxp.com>
+
+commit 3f93a4f297961c12bb17aa16cb3a4d1291823cae upstream.
+
+It is possible for an irq triggered by channel0 to be received later
+after clks are disabled once firmware loaded during sdma probe. If
+that happens then clearing them by writing to SDMA_H_INTR won't work
+and the kernel will hang processing infinite interrupts. Actually,
+don't need interrupt triggered on channel0 since it's pollling
+SDMA_H_STATSTOP to know channel0 done rather than interrupt in
+current code, just clear BD_INTR to disable channel0 interrupt to
+avoid the above case.
+This issue was brought by commit 1d069bfa3c78 ("dmaengine: imx-sdma:
+ack channel 0 IRQ in the interrupt handler") which didn't take care
+the above case.
+
+Fixes: 1d069bfa3c78 ("dmaengine: imx-sdma: ack channel 0 IRQ in the interrupt handler")
+Cc: stable@vger.kernel.org #5.0+
+Signed-off-by: Robin Gong <yibin.gong@nxp.com>
+Reported-by: Sven Van Asbroeck <thesven73@gmail.com>
+Tested-by: Sven Van Asbroeck <thesven73@gmail.com>
+Reviewed-by: Michael Olbrich <m.olbrich@pengutronix.de>
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/imx-sdma.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/dma/imx-sdma.c
++++ b/drivers/dma/imx-sdma.c
+@@ -614,7 +614,7 @@ static int sdma_load_script(struct sdma_
+       spin_lock_irqsave(&sdma->channel_0_lock, flags);
+       bd0->mode.command = C0_SETPM;
+-      bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
++      bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
+       bd0->mode.count = size / 2;
+       bd0->buffer_addr = buf_phys;
+       bd0->ext_buffer_addr = address;
+@@ -883,7 +883,7 @@ static int sdma_load_context(struct sdma
+       context->gReg[7] = sdmac->watermark_level;
+       bd0->mode.command = C0_SETDM;
+-      bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
++      bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
+       bd0->mode.count = sizeof(*context) / 4;
+       bd0->buffer_addr = sdma->context_phys;
+       bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel;
index 4b37a5d8670062bb529fe161b7caa5ac211ab8dc..5b71b49fcbf8105db8ceeb64ca52fc301e303dab 100644 (file)
@@ -70,3 +70,4 @@ tty-rocket-fix-incorrect-forward-declaration-of-rp_i.patch
 arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch
 arm64-vdso-define-vdso_-start-end-as-array.patch
 kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch
+dmaengine-imx-sdma-remove-bd_intr-for-channel0.patch