Skip to content

Commit

Permalink
dmatest: fix automatic buffer unmap type
Browse files Browse the repository at this point in the history
The dmatest code relies on the DMAEngine API to automatically call
dma_unmap_single() on src buffers. The flags it passes are incorrect,
fix them.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Ira Snyder authored and Dan Williams committed Mar 12, 2011
1 parent 6c11371 commit b203bd3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/dma/dmatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ static int dmatest_func(void *data)

set_user_nice(current, 10);

flags = DMA_CTRL_ACK | DMA_COMPL_SKIP_DEST_UNMAP | DMA_PREP_INTERRUPT;
/*
* src buffers are freed by the DMAEngine code with dma_unmap_single()
* dst buffers are freed by ourselves below
*/
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT
| DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SRC_UNMAP_SINGLE;

while (!kthread_should_stop()
&& !(iterations && total_tests >= iterations)) {
Expand Down

0 comments on commit b203bd3

Please sign in to comment.