Skip to content

Commit

Permalink
dmaengine: jz4740: Fix non-cyclic descriptor completion
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
larsclausen authored and Vinod Koul committed Sep 11, 2014
1 parent 87c9c45 commit f498e06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/dma/dma-jz4740.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,9 @@ static void jz4740_dma_chan_irq(struct jz4740_dmaengine_chan *chan)
vchan_cyclic_callback(&chan->desc->vdesc);
} else {
if (chan->next_sg == chan->desc->num_sgs) {
chan->desc = NULL;
list_del(&chan->desc->vdesc.node);
vchan_cookie_complete(&chan->desc->vdesc);
chan->desc = NULL;
}
}
}
Expand Down

0 comments on commit f498e06

Please sign in to comment.