Re: [PATCH] crypto: hisilicon/qm - check function qp num before alg register

From: Herbert Xu
Date: Thu Oct 05 2023 - 13:30:12 EST


On Thu, Sep 28, 2023 at 05:21:47PM +0800, Weili Qian wrote:
> 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@xxxxxxxxxx>
> ---
> drivers/crypto/hisilicon/hpre/hpre_crypto.c | 25 ++++++++++-
> drivers/crypto/hisilicon/hpre/hpre_main.c | 14 +++---
> drivers/crypto/hisilicon/qm.c | 47 +++++++--------------
> drivers/crypto/hisilicon/sec2/sec_crypto.c | 31 ++++++++++++--
> drivers/crypto/hisilicon/sec2/sec_main.c | 24 +++++------
> drivers/crypto/hisilicon/zip/zip_crypto.c | 24 ++++++++++-
> drivers/crypto/hisilicon/zip/zip_main.c | 14 +++---
> include/linux/hisi_acc_qm.h | 18 +++++++-
> 8 files changed, 134 insertions(+), 63 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt