dmaengine: stm32-dma: use vchan_terminate_vdesc() in .terminate_all
authorAmelie Delaunay <amelie.delaunay@st.com>
Wed, 29 Jan 2020 15:36:28 +0000 (16:36 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 25 Feb 2020 05:45:05 +0000 (11:15 +0530)
commitd80cbef35bf89b763f06e03bb4ff8f933bf012c5
tree32ba0babe1aeba8ce805c31eeb81102e7ba17996
parent409ffc4d990c157f876f105d06e11c1f21444cb7
dmaengine: stm32-dma: use vchan_terminate_vdesc() in .terminate_all

To avoid race with vchan_complete, use the race free way to terminate
running transfer.

Move vdesc->node list_del in stm32_dma_start_transfer instead of in
stm32_mdma_chan_complete to avoid another race in vchan_dma_desc_free_list.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20200129153628.29329-9-amelie.delaunay@st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dma.c