.. | .. |
---|
41 | 41 | sfc_init(reg_addr); |
---|
42 | 42 | ret = snor_init(sfnor_dev); |
---|
43 | 43 | if (ret == SFC_OK && sfnor_dev->read_lines == DATA_LINES_X1) { |
---|
44 | | - struct crypto_skcipher *tfm_arc4; |
---|
| 44 | + struct crypto_sync_skcipher *tfm_arc4; |
---|
45 | 45 | |
---|
46 | | - tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, |
---|
47 | | - CRYPTO_ALG_ASYNC); |
---|
| 46 | + tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
---|
48 | 47 | if (IS_ERR(tfm_arc4)) { |
---|
49 | | - crypto_free_skcipher(tfm_arc4); |
---|
| 48 | + crypto_free_sync_skcipher(tfm_arc4); |
---|
50 | 49 | return SFC_OK; |
---|
51 | 50 | } |
---|
52 | 51 | |
---|
53 | 52 | idb_tag = kzalloc(NOR_SECS_PAGE * 512, GFP_KERNEL); |
---|
54 | 53 | if (!idb_tag) { |
---|
55 | | - crypto_free_skcipher(tfm_arc4); |
---|
| 54 | + crypto_free_sync_skcipher(tfm_arc4); |
---|
56 | 55 | return SFC_OK; |
---|
57 | 56 | } |
---|
58 | 57 | |
---|
.. | .. |
---|
64 | 63 | idb_tag); |
---|
65 | 64 | packet = (struct snor_info_packet *)&idb_tag->dev_param[0]; |
---|
66 | 65 | 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); |
---|
68 | 67 | u8 key[16] = {124, 78, 3, 4, 85, 5, 9, 7, |
---|
69 | 68 | 45, 44, 123, 56, 23, 13, 23, 17}; |
---|
70 | 69 | struct scatterlist sg; |
---|
71 | 70 | u32 len = sizeof(struct id_block_tag); |
---|
72 | 71 | |
---|
73 | | - crypto_skcipher_setkey(tfm_arc4, key, 16); |
---|
| 72 | + crypto_sync_skcipher_setkey(tfm_arc4, key, 16); |
---|
74 | 73 | 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); |
---|
76 | 75 | skcipher_request_set_callback(req, 0, NULL, NULL); |
---|
77 | 76 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, |
---|
78 | 77 | NULL); |
---|
.. | .. |
---|
83 | 82 | rkflash_print_error("snor reinit, ret= %d\n", ret); |
---|
84 | 83 | } |
---|
85 | 84 | } |
---|
86 | | - crypto_free_skcipher(tfm_arc4); |
---|
| 85 | + crypto_free_sync_skcipher(tfm_arc4); |
---|
87 | 86 | kfree(idb_tag); |
---|
88 | 87 | } |
---|
89 | 88 | |
---|