From ce0602f601b43b8062e5f51a4e3ca07e88a72b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Horia=20Geant=C4=83?= Date: Thu, 14 Sep 2017 16:21:56 +0300 Subject: crypto: caam/qi2 - fix fd_flt_dma dma unmapping direction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ă 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); -- cgit v0.10.2