dmaengine: omap-dma: Correct status reporting for memcpy
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 11 Nov 2015 10:37:55 +0000 (12:37 +0200)
committerVinod Koul <vinod.koul@intel.com>
Sat, 5 Dec 2015 08:06:38 +0000 (13:36 +0530)
During mem copy both src and dst position moves at the same pace. Check the
dst position for progress reporting.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/omap-dma.c

index 1dfc71c90123fc30c7377684471da661799e1985..8ed39ce24d461cab55aaa973287b0a3b7c30a3b0 100644 (file)
@@ -719,7 +719,7 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
 
                if (d->dir == DMA_MEM_TO_DEV)
                        pos = omap_dma_get_src_pos(c);
-               else if (d->dir == DMA_DEV_TO_MEM)
+               else if (d->dir == DMA_DEV_TO_MEM  || d->dir == DMA_MEM_TO_MEM)
                        pos = omap_dma_get_dst_pos(c);
                else
                        pos = 0;