Commit 58fbe1d8 authored by Kai Ye's avatar Kai Ye Committed by Zheng Zengkai
Browse files

crypto: hisilicon/qm - add dfx log if not use hardware crypto algs

mainline inclusion
from mainline-master
commit dc118034
category: feature
bugzilla: 173981
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dc11803409fbf8bc5a326ddd9f24cde620b3519d



----------------------------------------------------------------------

Add print information necessary if not use hardware crypto algs.

Signed-off-by: default avatarKai Ye <yekai13@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarMingqiang Ling <lingmingqiang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 3d0ba0a5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4252,11 +4252,14 @@ static void hisi_qm_controller_reset(struct work_struct *rst_work)
 */
int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list)
{
	struct device *dev = &qm->pdev->dev;
	int flag = 0;
	int ret = 0;
	/* HW V2 not support both use uacce sva mode and hardware crypto algs */
	if (qm->ver <= QM_HW_V2 && qm->use_sva)

	if (qm->ver <= QM_HW_V2 && qm->use_sva) {
		dev_info(dev, "HW V2 not both use uacce sva mode and hardware crypto algs.\n");
		return 0;
	}

	mutex_lock(&qm_list->lock);
	if (list_empty(&qm_list->list))