summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-11-14 17:32:06 +0300
committerVinod Koul <vinod.koul@intel.com>2017-12-04 20:03:51 +0300
commit174334bcd9f87286aead3b1a470a82348f9d43ec (patch)
treef9e105cf2bd4d49767ccf62bce89af3efdf03245 /drivers/dma
parentb1faf0f564ffa6c58f7c7c9a9263dc0f7f78e215 (diff)
downloadlinux-174334bcd9f87286aead3b1a470a82348f9d43ec.tar.xz
dmaengine: edma: Use vchan_terminate_vdesc() instead of desc_free
To avoid race with vchan_complete, use the race free way to terminate running transfer. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/edma.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 9364a3ed345a..948df1ab5f1a 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -860,11 +860,8 @@ static int edma_terminate_all(struct dma_chan *chan)
/* Move the cyclic channel back to default queue */
if (!echan->tc && echan->edesc->cyclic)
edma_assign_channel_eventq(echan, EVENTQ_DEFAULT);
- /*
- * free the running request descriptor
- * since it is not in any of the vdesc lists
- */
- edma_desc_free(&echan->edesc->vdesc);
+
+ vchan_terminate_vdesc(&echan->edesc->vdesc);
echan->edesc = NULL;
}