linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Thomas Fourier <fourier.thomas@gmail.com>
Cc: stable@vger.kernel.org, Neal Liu <neal_liu@aspeedtech.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Joel Stanley <joel@jms.id.au>,
	Dhananjay Phadke <dphadke@linux.microsoft.com>,
	Johnny Huang <johnny_huang@aspeedtech.com>,
	linux-aspeed@lists.ozlabs.org,  linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: aspeed - Fix dma_unmap_sg() direction
Date: Wed, 10 Sep 2025 16:28:42 +0930	[thread overview]
Message-ID: <8d7b13b2eb51929ca2c1c3040b9fcf9f7dd16412.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20250905115112.26309-2-fourier.thomas@gmail.com>

On Fri, 2025-09-05 at 13:51 +0200, Thomas Fourier wrote:
> It seems like everywhere in this file, when the request is not
> bidirectional, req->src is mapped with DMA_TO_DEVICE 
> 

Okay, however:

> and req->src is
> mapped with DMA_FROM_DEVICE.

By the patch itself, one should refer to req->dst?

Andrew

> 
> Fixes: 62f58b1637b7 ("crypto: aspeed - add HACE crypto driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
>  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);
>         }


      reply	other threads:[~2025-09-10  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 11:51 [PATCH] crypto: aspeed - Fix dma_unmap_sg() direction Thomas Fourier
2025-09-10  6:58 ` Andrew Jeffery [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d7b13b2eb51929ca2c1c3040b9fcf9f7dd16412.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --cc=davem@davemloft.net \
    --cc=dphadke@linux.microsoft.com \
    --cc=fourier.thomas@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=joel@jms.id.au \
    --cc=johnny_huang@aspeedtech.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neal_liu@aspeedtech.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).