summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/hisilicon
diff options
context:
space:
mode:
authorLongfang Liu <liulongfang@huawei.com>2020-09-10 19:56:39 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-18 17:20:11 +1000
commitc4f8f62fe13ae397fb7339d31eaee5fbe81f4560 (patch)
treed41fdcf37401c9bbab87a0b8e7b2535867310869 /drivers/crypto/hisilicon
parent37b15fa97e12796854ed41d3a6d7e8f54e27ef1f (diff)
crypto: hisilicon - update mininum queue
At present, as HPRE/SEC/ZIP modules' parameter 'pf_q_num' is 1, kernel CRYPTO test will fail on the algorithms from the modules, since 'QP' hardware resources are not enough for CRYPTO TFM. To fix this, the minimum value of 'pf_q_num' should be 2. Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon')
-rw-r--r--drivers/crypto/hisilicon/qm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/hisilicon/qm.h b/drivers/crypto/hisilicon/qm.h
index 6773f444d150..0420f4ce7197 100644
--- a/drivers/crypto/hisilicon/qm.h
+++ b/drivers/crypto/hisilicon/qm.h
@@ -79,7 +79,7 @@
#define QM_BASE_CE QM_ECC_1BIT
#define QM_Q_DEPTH 1024
-
+#define QM_MIN_QNUM 2
#define HISI_ACC_SGL_SGE_NR_MAX 255
/* page number for queue file region */
@@ -309,7 +309,7 @@ static inline int q_num_set(const char *val, const struct kernel_param *kp,
}
ret = kstrtou32(val, 10, &n);
- if (ret || !n || n > q_num)
+ if (ret || n < QM_MIN_QNUM || n > q_num)
return -EINVAL;
return param_set_int(val, kp);