diff options
Diffstat (limited to 'crypto/async_tx/async_memcpy.c')
-rw-r--r-- | crypto/async_tx/async_memcpy.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c index 047e533fcc5..e8c8956ef1d 100644 --- a/crypto/async_tx/async_memcpy.c +++ b/crypto/async_tx/async_memcpy.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * @src: src page | 35 | * @src: src page |
36 | * @offset: offset in pages to start transaction | 36 | * @offset: offset in pages to start transaction |
37 | * @len: length in bytes | 37 | * @len: length in bytes |
38 | * @flags: ASYNC_TX_ASSUME_COHERENT, ASYNC_TX_ACK, ASYNC_TX_DEP_ACK, | 38 | * @flags: ASYNC_TX_ACK, ASYNC_TX_DEP_ACK, |
39 | * @depend_tx: memcpy depends on the result of this transaction | 39 | * @depend_tx: memcpy depends on the result of this transaction |
40 | * @cb_fn: function to call when the memcpy completes | 40 | * @cb_fn: function to call when the memcpy completes |
41 | * @cb_param: parameter to pass to the callback routine | 41 | * @cb_param: parameter to pass to the callback routine |
@@ -55,20 +55,15 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
55 | 55 | ||
56 | if (tx) { /* run the memcpy asynchronously */ | 56 | if (tx) { /* run the memcpy asynchronously */ |
57 | dma_addr_t addr; | 57 | dma_addr_t addr; |
58 | enum dma_data_direction dir; | ||
59 | 58 | ||
60 | pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); | 59 | pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); |
61 | 60 | ||
62 | dir = (flags & ASYNC_TX_ASSUME_COHERENT) ? | 61 | addr = dma_map_page(device->dev, dest, dest_offset, len, |
63 | DMA_NONE : DMA_FROM_DEVICE; | 62 | DMA_FROM_DEVICE); |
64 | |||
65 | addr = dma_map_page(device->dev, dest, dest_offset, len, dir); | ||
66 | tx->tx_set_dest(addr, tx, 0); | 63 | tx->tx_set_dest(addr, tx, 0); |
67 | 64 | ||
68 | dir = (flags & ASYNC_TX_ASSUME_COHERENT) ? | 65 | addr = dma_map_page(device->dev, src, src_offset, len, |
69 | DMA_NONE : DMA_TO_DEVICE; | 66 | DMA_TO_DEVICE); |
70 | |||
71 | addr = dma_map_page(device->dev, src, src_offset, len, dir); | ||
72 | tx->tx_set_src(addr, tx, 0); | 67 | tx->tx_set_src(addr, tx, 0); |
73 | 68 | ||
74 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); | 69 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); |