path: root/drivers/crypto/marvell/cesa.c
diff options
authorRomain Perier <romain.perier@free-electrons.com>2016-06-21 10:08:34 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2016-06-23 18:14:03 +0800
commitbac8e805a30dc2a29c3fdde9d822e59c75e710d7 (patch)
tree0eb0fdc0a856f601eab7f627ffe10e5312d90a3b /drivers/crypto/marvell/cesa.c
parentb99acf79a17bf402ea5759ad9d44eba3ed837a59 (diff)
crypto: marvell - Copy IV vectors by DMA transfers for acipher requests
Add a TDMA descriptor at the end of the request for copying the output IV vector via a DMA transfer. This is a good way for offloading as much as processing as possible to the DMA and the crypto engine. This is also required for processing multiple cipher requests in chained mode, otherwise the content of the IV vector would be overwritten by the last processed request. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/cesa.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index 47552c12e8c6..9063f56d8725 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -312,6 +312,10 @@ static int mv_cesa_dev_dma_init(struct mv_cesa_dev *cesa)
if (!dma->padding_pool)
return -ENOMEM;
+ dma->iv_pool = dmam_pool_create("cesa_iv", dev, 16, 1, 0);
+ if (!dma->iv_pool)
+ return -ENOMEM;
cesa->dma = dma;
return 0;