From c722e7576cd01ebfb13d3fc15bb6089bcea630e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 8 Dec 2011 09:15:43 +0100 Subject: [PATCH] --- yaml --- r: 286133 b: refs/heads/master c: 6d23ea4b1906f28f5d99ad6aeef7207c48be6bfd h: refs/heads/master i: 286131: 33658b821a72d161ef7032ad782a39fd21945479 v: v3 --- [refs] | 2 +- trunk/drivers/dma/mxs-dma.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8bc1500822b0..ff35f9070c5f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: feb397de65c3f76e40ef70e264f2cdf688c850c1 +refs/heads/master: 6d23ea4b1906f28f5d99ad6aeef7207c48be6bfd diff --git a/trunk/drivers/dma/mxs-dma.c b/trunk/drivers/dma/mxs-dma.c index b0e6ac3e09aa..1b4c6be3aacb 100644 --- a/trunk/drivers/dma/mxs-dma.c +++ b/trunk/drivers/dma/mxs-dma.c @@ -111,6 +111,7 @@ struct mxs_dma_chan { int chan_irq; struct mxs_dma_ccw *ccw; dma_addr_t ccw_phys; + int desc_count; dma_cookie_t last_completed; enum dma_status status; unsigned int flags; @@ -386,7 +387,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg( struct scatterlist *sg; int i, j; u32 *pio; - static int idx; + int idx = append ? mxs_chan->desc_count : 0; if (mxs_chan->status == DMA_IN_PROGRESS && !append) return NULL; @@ -462,6 +463,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg( } } } + mxs_chan->desc_count = idx; return &mxs_chan->desc; @@ -523,6 +525,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_dma_cyclic( i++; } + mxs_chan->desc_count = i; return &mxs_chan->desc;