crypto: hisilicon/qm - fix PF queue parameter issue
authorLongfang Liu <liulongfang@huawei.com>
Thu, 28 Sep 2023 08:57:22 +0000 (16:57 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 5 Oct 2023 10:16:30 +0000 (18:16 +0800)
commit5831fc1fd4a578232fea708b82de0c666ed17153
tree07bd5f661303394316c00a9c9c1f769b1c7be239
parente12a68b3c6ac2cecb365b57c639df71e3564d68b
crypto: hisilicon/qm - fix PF queue parameter issue

If the queue isolation feature is enabled, the number of queues
supported by the device changes. When PF is enabled using the
current default number of queues, the default number of queues may
be greater than the number supported by the device. As a result,
the PF fails to be bound to the driver.

After modification, if queue isolation feature is enabled, when
the default queue parameter is greater than the number supported
by the device, the number of enabled queues will be changed to
the number supported by the device, so that the PF and driver
can be properly bound.

Fixes: 8bbecfb402f7 ("crypto: hisilicon/qm - add queue isolation support for Kunpeng930")
Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_main.c
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/qm_common.h
drivers/crypto/hisilicon/sec2/sec_main.c
drivers/crypto/hisilicon/zip/zip_main.c
include/linux/hisi_acc_qm.h