diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2017-09-14 13:21:56 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:52 (GMT) |
commit | ce0602f601b43b8062e5f51a4e3ca07e88a72b49 (patch) | |
tree | 02af88347ef7ddb6cd67e79741715160bb1772b0 /drivers/crypto/caam | |
parent | cf81c7fc3fb4a7800bcea1a662a51c324a7a9c94 (diff) | |
download | linux-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/caam')
-rw-r--r-- | drivers/crypto/caam/caamalg_qi2.c | 4 |
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); |