aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2013-10-18 13:35:21 -0400
committerDan Williams <dan.j.williams@intel.com>2013-11-13 14:49:38 -0500
commitd1cab34c039584ebe76b04d2f2109e0d87d344e1 (patch)
tree0850c38b4834ccfde075a72c84eb803e59091e4f /drivers/dma
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
dmatest: make driver unmap also source buffers by itself
Make the driver DMA unmap also source buffers by itself (currently it DMA unmaps only destination buffers) as a preparation for introducing generic 'ummap' data. Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmatest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 92f796cdc6ab..f4a2a25fae31 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -597,11 +597,10 @@ static int dmatest_func(void *data)
597 set_user_nice(current, 10); 597 set_user_nice(current, 10);
598 598
599 /* 599 /*
600 * src buffers are freed by the DMAEngine code with dma_unmap_single() 600 * src and dst buffers are freed by ourselves below
601 * dst buffers are freed by ourselves below
602 */ 601 */
603 flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT 602 flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT |
604 | DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SRC_UNMAP_SINGLE; 603 DMA_COMPL_SKIP_SRC_UNMAP | DMA_COMPL_SKIP_DEST_UNMAP;
605 604
606 while (!kthread_should_stop() 605 while (!kthread_should_stop()
607 && !(params->iterations && total_tests >= params->iterations)) { 606 && !(params->iterations && total_tests >= params->iterations)) {
@@ -750,7 +749,8 @@ static int dmatest_func(void *data)
750 continue; 749 continue;
751 } 750 }
752 751
753 /* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */ 752 /* Unmap by myself */
753 unmap_src(dev->dev, dma_srcs, len, src_cnt);
754 unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt); 754 unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt);
755 755
756 error_count = 0; 756 error_count = 0;