linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] crypto: aspeed - Fix dma_unmap_sg() direction
@ 2025-09-10  8:22 Thomas Fourier
  2025-09-20 12:24 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Fourier @ 2025-09-10  8:22 UTC (permalink / raw)
  Cc: Thomas Fourier, stable, Neal Liu, Herbert Xu, David S. Miller,
	Joel Stanley, Andrew Jeffery, Johnny Huang, Dhananjay Phadke,
	linux-aspeed, linux-crypto, linux-arm-kernel, linux-kernel

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: 62f58b1637b7 ("crypto: aspeed - add HACE crypto driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
v1->v2:
  - fix confusion between dst and src in commit message 

 drivers/crypto/aspeed/aspeed-hace-crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/aspeed/aspeed-hace-crypto.c b/drivers/crypto/aspeed/aspeed-hace-crypto.c
index a72dfebc53ff..fa201dae1f81 100644
--- a/drivers/crypto/aspeed/aspeed-hace-crypto.c
+++ b/drivers/crypto/aspeed/aspeed-hace-crypto.c
@@ -346,7 +346,7 @@ static int aspeed_sk_start_sg(struct aspeed_hace_dev *hace_dev)
 
 	} else {
 		dma_unmap_sg(hace_dev->dev, req->dst, rctx->dst_nents,
-			     DMA_TO_DEVICE);
+			     DMA_FROM_DEVICE);
 		dma_unmap_sg(hace_dev->dev, req->src, rctx->src_nents,
 			     DMA_TO_DEVICE);
 	}
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] crypto: aspeed - Fix dma_unmap_sg() direction
  2025-09-10  8:22 [PATCH v2] crypto: aspeed - Fix dma_unmap_sg() direction Thomas Fourier
@ 2025-09-20 12:24 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2025-09-20 12:24 UTC (permalink / raw)
  To: Thomas Fourier
  Cc: stable, Neal Liu, David S. Miller, Joel Stanley, Andrew Jeffery,
	Johnny Huang, Dhananjay Phadke, linux-aspeed, linux-crypto,
	linux-arm-kernel, linux-kernel

On Wed, Sep 10, 2025 at 10:22:31AM +0200, Thomas Fourier wrote:
> 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: 62f58b1637b7 ("crypto: aspeed - add HACE crypto driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> v1->v2:
>   - fix confusion between dst and src in commit message 
> 
>  drivers/crypto/aspeed/aspeed-hace-crypto.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-20 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10  8:22 [PATCH v2] crypto: aspeed - Fix dma_unmap_sg() direction Thomas Fourier
2025-09-20 12:24 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).