Commit c4f8f62f authored by Longfang Liu's avatar Longfang Liu Committed by Herbert Xu

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: default avatarLongfang Liu <liulongfang@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 37b15fa9
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
#define QM_BASE_CE QM_ECC_1BIT #define QM_BASE_CE QM_ECC_1BIT
#define QM_Q_DEPTH 1024 #define QM_Q_DEPTH 1024
#define QM_MIN_QNUM 2
#define HISI_ACC_SGL_SGE_NR_MAX 255 #define HISI_ACC_SGL_SGE_NR_MAX 255
/* page number for queue file region */ /* page number for queue file region */
...@@ -309,7 +309,7 @@ static inline int q_num_set(const char *val, const struct kernel_param *kp, ...@@ -309,7 +309,7 @@ static inline int q_num_set(const char *val, const struct kernel_param *kp,
} }
ret = kstrtou32(val, 10, &n); ret = kstrtou32(val, 10, &n);
if (ret || !n || n > q_num) if (ret || n < QM_MIN_QNUM || n > q_num)
return -EINVAL; return -EINVAL;
return param_set_int(val, kp); return param_set_int(val, kp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment