diff options
author | Ira Snyder <iws@ovro.caltech.edu> | 2011-03-03 07:54:53 +0000 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-03-11 17:52:35 -0800 |
commit | b203bd3f6b9c3db3b1979c2ff79bb2b9be8f03a3 (patch) | |
tree | 647397b857fcad368078a72711ad2d25c7ea030a /drivers | |
parent | 6c11371dd17c5bd29e3a53cf5263be6ea67c51e4 (diff) | |
download | linux-b203bd3f6b9c3db3b1979c2ff79bb2b9be8f03a3.tar.gz linux-b203bd3f6b9c3db3b1979c2ff79bb2b9be8f03a3.tar.bz2 linux-b203bd3f6b9c3db3b1979c2ff79bb2b9be8f03a3.zip |
dmatest: fix automatic buffer unmap type
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/dmatest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 5589358b684d..7e1b0aa0ca50 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -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)) { |