aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pl330.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e7f9d1d3d81a..59943ec1e74a 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -262,10 +262,11 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)
262static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned long arg) 262static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned long arg)
263{ 263{
264 struct dma_pl330_chan *pch = to_pchan(chan); 264 struct dma_pl330_chan *pch = to_pchan(chan);
265 struct dma_pl330_desc *desc; 265 struct dma_pl330_desc *desc, *_dt;
266 unsigned long flags; 266 unsigned long flags;
267 struct dma_pl330_dmac *pdmac = pch->dmac; 267 struct dma_pl330_dmac *pdmac = pch->dmac;
268 struct dma_slave_config *slave_config; 268 struct dma_slave_config *slave_config;
269 LIST_HEAD(list);
269 270
270 switch (cmd) { 271 switch (cmd) {
271 case DMA_TERMINATE_ALL: 272 case DMA_TERMINATE_ALL:
@@ -275,12 +276,14 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned
275 pl330_chan_ctrl(pch->pl330_chid, PL330_OP_FLUSH); 276 pl330_chan_ctrl(pch->pl330_chid, PL330_OP_FLUSH);
276 277
277 /* Mark all desc done */ 278 /* Mark all desc done */
278 list_for_each_entry(desc, &pch->work_list, node) 279 list_for_each_entry_safe(desc, _dt, &pch->work_list , node) {
279 desc->status = DONE; 280 desc->status = DONE;
281 pch->completed = desc->txd.cookie;
282 list_move_tail(&desc->node, &list);
283 }
280 284
285 list_splice_tail_init(&list, &pdmac->desc_pool);
281 spin_unlock_irqrestore(&pch->lock, flags); 286 spin_unlock_irqrestore(&pch->lock, flags);
282
283 pl330_tasklet((unsigned long) pch);
284 break; 287 break;
285 case DMA_SLAVE_CONFIG: 288 case DMA_SLAVE_CONFIG:
286 slave_config = (struct dma_slave_config *)arg; 289 slave_config = (struct dma_slave_config *)arg;