aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/async_tx/async_memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/async_tx/async_memset.c')
-rw-r--r--crypto/async_tx/async_memset.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/async_tx/async_memset.c b/crypto/async_tx/async_memset.c
index 760972803958..0c94851cfd37 100644
--- a/crypto/async_tx/async_memset.c
+++ b/crypto/async_tx/async_memset.c
@@ -48,20 +48,20 @@ async_memset(struct page *dest, int val, unsigned int offset,
48{ 48{
49 struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMSET); 49 struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_MEMSET);
50 struct dma_device *device = chan ? chan->device : NULL; 50 struct dma_device *device = chan ? chan->device : NULL;
51 int int_en = cb_fn ? 1 : 0; 51 struct dma_async_tx_descriptor *tx = NULL;
52 struct dma_async_tx_descriptor *tx = device ?
53 device->device_prep_dma_memset(chan, val, len,
54 int_en) : NULL;
55 52
56 if (tx) { /* run the memset asynchronously */ 53 if (device) {
57 dma_addr_t dma_addr; 54 dma_addr_t dma_dest;
58 55
59 pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); 56 dma_dest = dma_map_page(device->dev, dest, offset, len,
60
61 dma_addr = dma_map_page(device->dev, dest, offset, len,
62 DMA_FROM_DEVICE); 57 DMA_FROM_DEVICE);
63 tx->tx_set_dest(dma_addr, tx, 0);
64 58
59 tx = device->device_prep_dma_memset(chan, dma_dest, val, len,
60 cb_fn != NULL);
61 }
62
63 if (tx) {
64 pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len);
65 async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); 65 async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param);
66 } else { /* run the memset synchronously */ 66 } else { /* run the memset synchronously */
67 void *dest_buf; 67 void *dest_buf;