hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rkflash/sfc_nor_boot.c
....@@ -41,18 +41,17 @@
4141 sfc_init(reg_addr);
4242 ret = snor_init(sfnor_dev);
4343 if (ret == SFC_OK && sfnor_dev->read_lines == DATA_LINES_X1) {
44
- struct crypto_skcipher *tfm_arc4;
44
+ struct crypto_sync_skcipher *tfm_arc4;
4545
46
- tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0,
47
- CRYPTO_ALG_ASYNC);
46
+ tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0);
4847 if (IS_ERR(tfm_arc4)) {
49
- crypto_free_skcipher(tfm_arc4);
48
+ crypto_free_sync_skcipher(tfm_arc4);
5049 return SFC_OK;
5150 }
5251
5352 idb_tag = kzalloc(NOR_SECS_PAGE * 512, GFP_KERNEL);
5453 if (!idb_tag) {
55
- crypto_free_skcipher(tfm_arc4);
54
+ crypto_free_sync_skcipher(tfm_arc4);
5655 return SFC_OK;
5756 }
5857
....@@ -64,15 +63,15 @@
6463 idb_tag);
6564 packet = (struct snor_info_packet *)&idb_tag->dev_param[0];
6665 if (idb_tag->id == IDB_BLOCK_TAG_ID) {
67
- SKCIPHER_REQUEST_ON_STACK(req, tfm_arc4);
66
+ SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm_arc4);
6867 u8 key[16] = {124, 78, 3, 4, 85, 5, 9, 7,
6968 45, 44, 123, 56, 23, 13, 23, 17};
7069 struct scatterlist sg;
7170 u32 len = sizeof(struct id_block_tag);
7271
73
- crypto_skcipher_setkey(tfm_arc4, key, 16);
72
+ crypto_sync_skcipher_setkey(tfm_arc4, key, 16);
7473 sg_init_one(&sg, idb_tag, len + 4);
75
- skcipher_request_set_tfm(req, tfm_arc4);
74
+ skcipher_request_set_sync_tfm(req, tfm_arc4);
7675 skcipher_request_set_callback(req, 0, NULL, NULL);
7776 skcipher_request_set_crypt(req, &sg, &sg, len + 4,
7877 NULL);
....@@ -83,7 +82,7 @@
8382 rkflash_print_error("snor reinit, ret= %d\n", ret);
8483 }
8584 }
86
- crypto_free_skcipher(tfm_arc4);
85
+ crypto_free_sync_skcipher(tfm_arc4);
8786 kfree(idb_tag);
8887 }
8988