Commit f0c8b6a1 authored by Zhou Wang's avatar Zhou Wang Committed by Herbert Xu

crypto: hisilicon - use sgl API to get sgl dma addr and len

Use sgl API to get sgl dma addr and len, this will help to avoid compile
error in some platforms. So NEED_SG_DMA_LENGTH can be removed here, which
can only be selected by arch code.
Signed-off-by: default avatarZhou Wang <wangzhou1@hisilicon.com>
Suggested-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b95bba5d
......@@ -18,7 +18,6 @@ config CRYPTO_DEV_HISI_QM
tristate
depends on ARM64 || COMPILE_TEST
depends on PCI && PCI_MSI
select NEED_SG_DMA_LENGTH
help
HiSilicon accelerator engines use a common queue management
interface. Specific engine driver may use this module.
......
......@@ -164,8 +164,8 @@ static struct hisi_acc_hw_sgl *acc_get_sgl(struct hisi_acc_sgl_pool *pool,
static void sg_map_to_hw_sg(struct scatterlist *sgl,
struct acc_hw_sge *hw_sge)
{
hw_sge->buf = sgl->dma_address;
hw_sge->len = cpu_to_le32(sgl->dma_length);
hw_sge->buf = sg_dma_address(sgl);
hw_sge->len = cpu_to_le32(sg_dma_len(sgl));
}
static void inc_hw_sgl_sge(struct hisi_acc_hw_sgl *hw_sgl)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment