aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mxs-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/mxs-dma.c')
-rw-r--r--drivers/dma/mxs-dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index b0e6ac3e09aa..1b4c6be3aacb 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -111,6 +111,7 @@ struct mxs_dma_chan {
111 int chan_irq; 111 int chan_irq;
112 struct mxs_dma_ccw *ccw; 112 struct mxs_dma_ccw *ccw;
113 dma_addr_t ccw_phys; 113 dma_addr_t ccw_phys;
114 int desc_count;
114 dma_cookie_t last_completed; 115 dma_cookie_t last_completed;
115 enum dma_status status; 116 enum dma_status status;
116 unsigned int flags; 117 unsigned int flags;
@@ -386,7 +387,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
386 struct scatterlist *sg; 387 struct scatterlist *sg;
387 int i, j; 388 int i, j;
388 u32 *pio; 389 u32 *pio;
389 static int idx; 390 int idx = append ? mxs_chan->desc_count : 0;
390 391
391 if (mxs_chan->status == DMA_IN_PROGRESS && !append) 392 if (mxs_chan->status == DMA_IN_PROGRESS && !append)
392 return NULL; 393 return NULL;
@@ -462,6 +463,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
462 } 463 }
463 } 464 }
464 } 465 }
466 mxs_chan->desc_count = idx;
465 467
466 return &mxs_chan->desc; 468 return &mxs_chan->desc;
467 469
@@ -523,6 +525,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_dma_cyclic(
523 525
524 i++; 526 i++;
525 } 527 }
528 mxs_chan->desc_count = i;
526 529
527 return &mxs_chan->desc; 530 return &mxs_chan->desc;
528 531