Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: dw-edma: Fix unmasking STOP and ABORT interrupts for HDMA

The current logic is enabling both STOP_INT_MASK and ABORT_INT_MASK
bit. This is apparently masking those particular interrupts rather than
unmasking the same. If the interrupts are masked, they would never get
triggered.

So fix the issue by unmasking the STOP and ABORT interrupts properly.

Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA")
cc: stable@vger.kernel.org
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1724674261-3144-2-git-send-email-quic_msarkar@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Mrinmay Sarkar and committed by
Vinod Koul
383baf5c b53b8319

+5 -4
+5 -4
drivers/dma/dw-edma/dw-hdma-v0-core.c
··· 247 247 if (first) { 248 248 /* Enable engine */ 249 249 SET_CH_32(dw, chan->dir, chan->id, ch_en, BIT(0)); 250 - /* Interrupt enable&unmask - done, abort */ 251 - tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup) | 252 - HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK | 253 - HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN; 250 + /* Interrupt unmask - stop, abort */ 251 + tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup); 252 + tmp &= ~(HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK); 253 + /* Interrupt enable - stop, abort */ 254 + tmp |= HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN; 254 255 if (!(dw->chip->flags & DW_EDMA_CHIP_LOCAL)) 255 256 tmp |= HDMA_V0_REMOTE_STOP_INT_EN | HDMA_V0_REMOTE_ABORT_INT_EN; 256 257 SET_CH_32(dw, chan->dir, chan->id, int_setup, tmp);