summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2017-09-14 13:21:56 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:52 (GMT)
commitce0602f601b43b8062e5f51a4e3ca07e88a72b49 (patch)
tree02af88347ef7ddb6cd67e79741715160bb1772b0 /drivers/crypto
parentcf81c7fc3fb4a7800bcea1a662a51c324a7a9c94 (diff)
downloadlinux-ce0602f601b43b8062e5f51a4e3ca07e88a72b49.tar.xz
crypto: caam/qi2 - fix fd_flt_dma dma unmapping direction
Direction for fd_flt_dma dma unmapping must be identical with the direction used for mapping, i.e. DMA_BIDIRECTIONAL. Fixes: 6220d7624b1d ("crypto: caam/qi2 - add DPAA2-CAAM driver") Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamalg_qi2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index c9e8707..06496fe 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -3822,7 +3822,7 @@ static void dpaa2_caam_process_fd(struct dpaa2_caam_priv *priv,
*/
req = dpaa2_caam_iova_to_virt(priv, dpaa2_fd_get_addr(fd));
dma_unmap_single(priv->dev, req->fd_flt_dma, sizeof(req->fd_flt),
- DMA_TO_DEVICE);
+ DMA_BIDIRECTIONAL);
req->cbk(req->ctx, dpaa2_fd_get_frc(fd));
}
@@ -4400,7 +4400,7 @@ int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req)
err_out:
dma_unmap_single(dev, req->fd_flt_dma, sizeof(req->fd_flt),
- DMA_TO_DEVICE);
+ DMA_BIDIRECTIONAL);
return -EIO;
}
EXPORT_SYMBOL(dpaa2_caam_enqueue);