diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-09-07 09:54:39 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-09-11 01:24:25 -0400 |
commit | f498e064e0b97df910163533e78e2704ba0a9570 (patch) | |
tree | 811c64f4245be8263f71bf3aeebf358c0a6b04eb /drivers/dma | |
parent | 87c9c451101f84ca4ed2cd11b0e32b5b0b66cb8b (diff) |
dmaengine: jz4740: Fix non-cyclic descriptor completion
We need to make sure to deqeueue the descriptor from the active list before
we call vchan_cookie_complete(). Also we need obviously only set chan->desc
to NULL after we stopped using it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dma-jz4740.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c index 6a9d89c93b1f..ae2ab14e64b3 100644 --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c | |||
@@ -362,8 +362,9 @@ static void jz4740_dma_chan_irq(struct jz4740_dmaengine_chan *chan) | |||
362 | vchan_cyclic_callback(&chan->desc->vdesc); | 362 | vchan_cyclic_callback(&chan->desc->vdesc); |
363 | } else { | 363 | } else { |
364 | if (chan->next_sg == chan->desc->num_sgs) { | 364 | if (chan->next_sg == chan->desc->num_sgs) { |
365 | chan->desc = NULL; | 365 | list_del(&chan->desc->vdesc.node); |
366 | vchan_cookie_complete(&chan->desc->vdesc); | 366 | vchan_cookie_complete(&chan->desc->vdesc); |
367 | chan->desc = NULL; | ||
367 | } | 368 | } |
368 | } | 369 | } |
369 | } | 370 | } |