]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: hisilicon - Fix issue with wrong number of sg elements after dma map
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Nov 2019 05:42:56 +0000 (13:42 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:34:44 +0000 (16:34 +0800)
commit3774a4ae7b1ed89b9a2712ad7318d5bb9b46fc2a
tree02ea8a9abab64a8f3abda061afc521a55b988456
parent7deb5d59a14f2e9c950738fcc6b91483ae56ee75
crypto: hisilicon - Fix issue with wrong number of sg elements after dma map

We fill the hardware scatter gather list assuming it will need the same
number of elements at the original scatterlist. If an IOMMU is involved,
then it may well need fewer. The return value of dma_map_sg tells us how
many.

Probably never caused visible problems as the hardware won't get to
the elements that are incorrect before it finds enough space.

Fixes: 9c16ada78edb (crypto: hisilicon - add hardware SGL support)
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sgl.c