Skip to content

Commit 3f93a4f

Browse files
Robin Gongvinodkoul
authored andcommitted
dmaengine: imx-sdma: remove BD_INTR for channel0
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 1d069bf ("dmaengine: imx-sdma: ack channel 0 IRQ in the interrupt handler") which didn't take care the above case. Fixes: 1d069bf ("dmaengine: imx-sdma: ack channel 0 IRQ in the interrupt handler") Cc: [email protected] #5.0+ Signed-off-by: Robin Gong <[email protected]> Reported-by: Sven Van Asbroeck <[email protected]> Tested-by: Sven Van Asbroeck <[email protected]> Reviewed-by: Michael Olbrich <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 2b8066c commit 3f93a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/imx-sdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size,
703703
spin_lock_irqsave(&sdma->channel_0_lock, flags);
704704

705705
bd0->mode.command = C0_SETPM;
706-
bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
706+
bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
707707
bd0->mode.count = size / 2;
708708
bd0->buffer_addr = buf_phys;
709709
bd0->ext_buffer_addr = address;
@@ -1025,7 +1025,7 @@ static int sdma_load_context(struct sdma_channel *sdmac)
10251025
context->gReg[7] = sdmac->watermark_level;
10261026

10271027
bd0->mode.command = C0_SETDM;
1028-
bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
1028+
bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
10291029
bd0->mode.count = sizeof(*context) / 4;
10301030
bd0->buffer_addr = sdma->context_phys;
10311031
bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel;

0 commit comments

Comments
 (0)