crypto: hisilicon/qm - check function qp num before alg register
authorWeili Qian <qianweili@huawei.com>
Thu, 28 Sep 2023 09:21:47 +0000 (17:21 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 5 Oct 2023 10:16:31 +0000 (18:16 +0800)
commitb42ab1c61a77832040ad42ebf9adf237360e49f7
treedbd6399b5cf72b8954b359db9c653f9b4b7ea09b
parentff3ddca9ca153d8a0ba0ed9325b15bdca92df769
crypto: hisilicon/qm - check function qp num before alg register

When the Kunpeng accelerator executes tasks such as encryption
and decryption have minimum requirements on the number of device
queues. If the number of queues does not meet the requirement,
the process initialization will fail. Therefore, the driver checks
the number of queues on the device before registering the algorithm.
If the number does not meet the requirements, the driver does not register
the algorithm to crypto subsystem, the device is still added to the
qm_list.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_crypto.c
drivers/crypto/hisilicon/hpre/hpre_main.c
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/sec2/sec_crypto.c
drivers/crypto/hisilicon/sec2/sec_main.c
drivers/crypto/hisilicon/zip/zip_crypto.c
drivers/crypto/hisilicon/zip/zip_main.c
include/linux/hisi_acc_qm.h