Skip to contentSkip to conversation

crypto: hisilicon/hpre - add ecc algorithm inqury for uacce device

PATCH In review Hui Tang 2 participants 2 messages Jan 18, 2021 – Jan 29, 2021

Subsystems (2)
lore
Share & tools
lore

Hui Tang

author
#0 lore raw

PATCH 1/1 crypto: hisilicon/hpre - add ecc algorithm inqury for uacce device

Uacce SysFS support more algorithms inqury such as 'ecdh/ecdsa/sm2/x25519/x448'

---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/crypto/hisilicon/hpre/hpre_main.c +4 -1
index d46086e..3b3481e 100644
@@ -778,7 +778,10 @@ static int hpre_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)
 		return -EINVAL;
 	}
 
-	qm->algs = "rsa\ndh\n";
+	if (pdev->revision >= QM_HW_V3)
+		qm->algs = "rsa\ndh\necdh\nx25519\nx448\necdsa\nsm2\n";
+	else
+		qm->algs = "rsa\ndh\n";
 	qm->mode = uacce_mode;
 	qm->pdev = pdev;
 	qm->ver = pdev->revision;
Signature · 1 line
2.8.1
maintainer
#1 lore raw
Quoted 8 lines · Hui Tang

Uacce SysFS support more algorithms inqury such as 'ecdh/ecdsa/sm2/x25519/x448'

---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt