dmaengine: stm32-dma: mark pending descriptor complete in terminate_all
To prevent accidental repeated completion, mark pending descriptor complete in terminate_all. It can be the case when terminate_all is called while no end of transfer interrupt occurs. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20211011094259.315023-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
committed by
Vinod Koul
parent
981703aae3
commit
79e40b06a4
@@ -497,6 +497,7 @@ static int stm32_dma_terminate_all(struct dma_chan *c)
|
||||
spin_lock_irqsave(&chan->vchan.lock, flags);
|
||||
|
||||
if (chan->desc) {
|
||||
dma_cookie_complete(&chan->desc->vdesc.tx);
|
||||
vchan_terminate_vdesc(&chan->desc->vdesc);
|
||||
if (chan->busy)
|
||||
stm32_dma_stop(chan);
|
||||
|
||||
Reference in New Issue
Block a user