[PATCH 3/3] dma: mv_xor: get rid of a DMA-API sanity check warning

2013-01-17 Thread Lubomir Rintel
mv_xor mv_xor.0: DMA-API: device driver frees DMA memory with different 
direction [device address=0x1dea4000] [size=4096 bytes] [mapped with 
DMA_FROM_DEVICE] [unmapped with DMA_BIDIRECTIONAL]

Change xor self test destination buffer allocation direction to bidirectional,
as it's what mv_xor_run_tx_complete_actions() frees for multiple sources.

Signed-off-by: Lubomir Rintel 
---
 drivers/dma/mv_xor.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index d00a834..1e90f5d 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1042,7 +1042,7 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan)
 
/* test xor */
dest_dma = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE,
-   DMA_FROM_DEVICE);
+   DMA_BIDIRECTIONAL);
if (dma_mapping_error(dma_chan->device->dev, dest_dma)) {
dev_err(dma_chan->device->dev,
"Could not map destination page, disabling\n");
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] dma: mv_xor: get rid of a DMA-API sanity check warning

2013-01-17 Thread Lubomir Rintel
mv_xor mv_xor.0: DMA-API: device driver frees DMA memory with different 
direction [device address=0x1dea4000] [size=4096 bytes] [mapped with 
DMA_FROM_DEVICE] [unmapped with DMA_BIDIRECTIONAL]

Change xor self test destination buffer allocation direction to bidirectional,
as it's what mv_xor_run_tx_complete_actions() frees for multiple sources.

Signed-off-by: Lubomir Rintel lkund...@v3.sk
---
 drivers/dma/mv_xor.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index d00a834..1e90f5d 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1042,7 +1042,7 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan)
 
/* test xor */
dest_dma = dma_map_page(dma_chan-device-dev, dest, 0, PAGE_SIZE,
-   DMA_FROM_DEVICE);
+   DMA_BIDIRECTIONAL);
if (dma_mapping_error(dma_chan-device-dev, dest_dma)) {
dev_err(dma_chan-device-dev,
Could not map destination page, disabling\n);
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/