Skip to content

Commit 0c89446

Browse files
lkundrakvinodkoul
authored andcommitted
dmaengine: mmp_tdma: Reset channel error on release
When a channel configuration fails, the status of the channel is set to DEV_ERROR so that an attempt to submit it fails. However, this status sticks until the heat end of the universe, making it impossible to recover from the error. Let's reset it when the channel is released so that further use of the channel with correct configuration is not impacted. Signed-off-by: Lubomir Rintel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 363c327 commit 0c89446

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/dma/mmp_tdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ static void mmp_tdma_free_descriptor(struct mmp_tdma_chan *tdmac)
363363
gen_pool_free(gpool, (unsigned long)tdmac->desc_arr,
364364
size);
365365
tdmac->desc_arr = NULL;
366+
if (tdmac->status == DMA_ERROR)
367+
tdmac->status = DMA_COMPLETE;
366368

367369
return;
368370
}

0 commit comments

Comments
 (0)