From: Amelie Delaunay Date: Mon, 11 Oct 2021 09:42:57 +0000 (+0200) Subject: dmaengine: stm32-dma: mark pending descriptor complete in terminate_all X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=79e40b06a4ebfc8e0a48ed6164345f8e0a96b699;p=linux.git 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 Link: https://lore.kernel.org/r/20211011094259.315023-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 9063c727962ed..a5ccf3fa95e0a 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -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);