未验证 提交 a7fc2ac7 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!882 [sync] PR-855: Remove the automatic loading of the hisi_trng driver

Merge Pull Request from: @openeuler-sync-bot 
 

Origin pull request: 
https://gitee.com/openeuler/kernel/pulls/855 
 
Remove the automatic loading of the hisi_trng driver
issue:https://gitee.com/openeuler/kernel/issues/I79JTN 
 
Link:https://gitee.com/openeuler/kernel/pulls/882 

Reviewed-by: Yang Shen <shenyang39@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
......@@ -27,6 +27,7 @@
#define SW_DRBG_SEED(n) (SW_DRBG_KEY_BASE - ((n) << SW_DRBG_NUM_SHIFT))
#define SW_DRBG_SEED_REGS_NUM 12
#define SW_DRBG_SEED_SIZE 48
#define SW_DRBG_CRYPTO_ALG_PRI 100
#define SW_DRBG_BLOCKS 0x0830
#define SW_DRBG_INIT 0x0834
#define SW_DRBG_GEN 0x083c
......@@ -121,7 +122,7 @@ static int hisi_trng_generate(struct crypto_rng *tfm, const u8 *src,
u32 i;
if (dlen > SW_DRBG_BLOCKS_NUM * SW_DRBG_BYTES || dlen == 0) {
pr_err("dlen(%d) exceeds limit(%d)!\n", dlen,
pr_err("dlen(%u) exceeds limit(%d)!\n", dlen,
SW_DRBG_BLOCKS_NUM * SW_DRBG_BYTES);
return -EINVAL;
}
......@@ -218,7 +219,7 @@ static struct rng_alg hisi_trng_alg = {
.base = {
.cra_name = "stdrng",
.cra_driver_name = "hisi_stdrng",
.cra_priority = 300,
.cra_priority = SW_DRBG_CRYPTO_ALG_PRI,
.cra_ctxsize = sizeof(struct hisi_trng_ctx),
.cra_module = THIS_MODULE,
.cra_init = hisi_trng_init,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册