From: Kai Ye Date: Fri, 9 Apr 2021 09:04:03 +0000 (+0800) Subject: crypto: hisilicon/sgl - fix the soft sg map to hardware sg X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4b95e17b8fcce5a137403f508fc77cad7d014c68;p=uclinux-h8%2Flinux.git crypto: hisilicon/sgl - fix the soft sg map to hardware sg The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index d04e551d5538..7f11e41385ae 100644 --- a/drivers/crypto/hisilicon/sgl.c +++ b/drivers/crypto/hisilicon/sgl.c @@ -176,6 +176,7 @@ static void sg_map_to_hw_sg(struct scatterlist *sgl, { hw_sge->buf = sg_dma_address(sgl); hw_sge->len = cpu_to_le32(sg_dma_len(sgl)); + hw_sge->page_ctrl = sg_virt(sgl); } static void inc_hw_sgl_sge(struct hisi_acc_hw_sgl *hw_sgl)