Skip to content

Commit 838d2d5

Browse files
Thomas-fourierherbertx
authored andcommitted
crypto: aspeed - Fix dma_unmap_sg() direction
It seems like everywhere in this file, when the request is not bidirectionala, req->src is mapped with DMA_TO_DEVICE and req->dst is mapped with DMA_FROM_DEVICE. Fixes: 62f58b1 ("crypto: aspeed - add HACE crypto driver") Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent bee8a52 commit 838d2d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/crypto/aspeed/aspeed-hace-crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static int aspeed_sk_start_sg(struct aspeed_hace_dev *hace_dev)
346346

347347
} else {
348348
dma_unmap_sg(hace_dev->dev, req->dst, rctx->dst_nents,
349-
DMA_TO_DEVICE);
349+
DMA_FROM_DEVICE);
350350
dma_unmap_sg(hace_dev->dev, req->src, rctx->src_nents,
351351
DMA_TO_DEVICE);
352352
}

0 commit comments

Comments
 (0)