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 <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Acked-by: Andy Shevchenko <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2013-10-18 19:35:21 +02:00 • committed by Dan Williams
commit d1cab34c03

View file

@ -597,11 +597,10 @@ static int dmatest_func(void *data)
set_user_nice(current, 10);
/*
* src buffers are freed by the DMAEngine code with dma_unmap_single()
* dst buffers are freed by ourselves below
* src and dst buffers are freed by ourselves below
*/
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT
| DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SRC_UNMAP_SINGLE;
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT |
DMA_COMPL_SKIP_SRC_UNMAP | DMA_COMPL_SKIP_DEST_UNMAP;
while (!kthread_should_stop()
&& !(params->iterations && total_tests >= params->iterations)) {
@ -750,7 +749,8 @@ static int dmatest_func(void *data)
continue;
}
/* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */
/* Unmap by myself */
unmap_src(dev->dev, dma_srcs, len, src_cnt);
unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt);
error_count = 0;