* [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue
@ 2025-12-19 3:36 Chenghai Huang
2025-12-23 12:37 ` Zenghui Yu
2026-01-16 6:06 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Chenghai Huang @ 2025-12-19 3:36 UTC (permalink / raw)
To: herbert, davem, yuzenghui
Cc: linux-kernel, linux-crypto, fanghao11, liulongfang, qianweili
Ensure that the direction for dma_map_sg and dma_unmap_sg is
consistent.
Fixes: 2566de3e06a3 ("crypto: hisilicon - Use fine grained DMA mapping direction")
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
---
drivers/crypto/hisilicon/sgl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c
index 24c7b6ab285b..d41b34405c21 100644
--- a/drivers/crypto/hisilicon/sgl.c
+++ b/drivers/crypto/hisilicon/sgl.c
@@ -260,7 +260,7 @@ hisi_acc_sg_buf_map_to_hw_sgl(struct device *dev, struct scatterlist *sgl,
return curr_hw_sgl;
err_unmap:
- dma_unmap_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL);
+ dma_unmap_sg(dev, sgl, sg_n, dir);
return ERR_PTR(ret);
}
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue
2025-12-19 3:36 [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue Chenghai Huang
@ 2025-12-23 12:37 ` Zenghui Yu
2026-01-16 6:06 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Zenghui Yu @ 2025-12-23 12:37 UTC (permalink / raw)
To: Chenghai Huang
Cc: herbert, davem, linux-kernel, linux-crypto, fanghao11,
liulongfang, qianweili
On 2025/12/19 11:36, Chenghai Huang wrote:
> Ensure that the direction for dma_map_sg and dma_unmap_sg is
> consistent.
>
> Fixes: 2566de3e06a3 ("crypto: hisilicon - Use fine grained DMA mapping direction")
> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
> ---
> drivers/crypto/hisilicon/sgl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c
> index 24c7b6ab285b..d41b34405c21 100644
> --- a/drivers/crypto/hisilicon/sgl.c
> +++ b/drivers/crypto/hisilicon/sgl.c
> @@ -260,7 +260,7 @@ hisi_acc_sg_buf_map_to_hw_sgl(struct device *dev, struct scatterlist *sgl,
> return curr_hw_sgl;
>
> err_unmap:
> - dma_unmap_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL);
> + dma_unmap_sg(dev, sgl, sg_n, dir);
>
> return ERR_PTR(ret);
> }
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Thanks for fixing it!
Zenghui
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue
2025-12-19 3:36 [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue Chenghai Huang
2025-12-23 12:37 ` Zenghui Yu
@ 2026-01-16 6:06 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2026-01-16 6:06 UTC (permalink / raw)
To: Chenghai Huang
Cc: davem, yuzenghui, linux-kernel, linux-crypto, fanghao11,
liulongfang, qianweili
On Fri, Dec 19, 2025 at 11:36:19AM +0800, Chenghai Huang wrote:
> Ensure that the direction for dma_map_sg and dma_unmap_sg is
> consistent.
>
> Fixes: 2566de3e06a3 ("crypto: hisilicon - Use fine grained DMA mapping direction")
> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
> ---
> drivers/crypto/hisilicon/sgl.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] 3+ messages in thread
end of thread, other threads:[~2026-01-16 6:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-19 3:36 [PATCH] crypto: hisilicon/sgl - fix inconsistent map/unmap direction issue Chenghai Huang
2025-12-23 12:37 ` Zenghui Yu
2026-01-16 6:06 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox