@@ -24,7 +24,7 @@ static void qce_aead_done(void *data)
24
24
{
25
25
struct crypto_async_request * async_req = data ;
26
26
struct aead_request * req = aead_request_cast (async_req );
27
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
27
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
28
28
struct qce_aead_ctx * ctx = crypto_tfm_ctx (async_req -> tfm );
29
29
struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
30
30
struct qce_device * qce = tmpl -> qce ;
@@ -92,7 +92,7 @@ static void qce_aead_done(void *data)
92
92
static struct scatterlist *
93
93
qce_aead_prepare_result_buf (struct sg_table * tbl , struct aead_request * req )
94
94
{
95
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
95
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
96
96
struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
97
97
struct qce_device * qce = tmpl -> qce ;
98
98
@@ -103,7 +103,7 @@ qce_aead_prepare_result_buf(struct sg_table *tbl, struct aead_request *req)
103
103
static struct scatterlist *
104
104
qce_aead_prepare_ccm_result_buf (struct sg_table * tbl , struct aead_request * req )
105
105
{
106
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
106
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
107
107
108
108
sg_init_one (& rctx -> result_sg , rctx -> ccmresult_buf , QCE_BAM_BURST_SIZE );
109
109
return qce_sgtable_add (tbl , & rctx -> result_sg , QCE_BAM_BURST_SIZE );
@@ -112,7 +112,7 @@ qce_aead_prepare_ccm_result_buf(struct sg_table *tbl, struct aead_request *req)
112
112
static struct scatterlist *
113
113
qce_aead_prepare_dst_buf (struct aead_request * req )
114
114
{
115
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
115
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
116
116
struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
117
117
struct qce_device * qce = tmpl -> qce ;
118
118
struct scatterlist * sg , * msg_sg , __sg [2 ];
@@ -186,7 +186,7 @@ qce_aead_ccm_prepare_buf_assoclen(struct aead_request *req)
186
186
{
187
187
struct scatterlist * sg , * msg_sg , __sg [2 ];
188
188
struct crypto_aead * tfm = crypto_aead_reqtfm (req );
189
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
189
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
190
190
struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
191
191
unsigned int assoclen = rctx -> assoclen ;
192
192
unsigned int adata_header_len , cryptlen , totallen ;
@@ -300,7 +300,7 @@ qce_aead_ccm_prepare_buf_assoclen(struct aead_request *req)
300
300
301
301
static int qce_aead_prepare_buf (struct aead_request * req )
302
302
{
303
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
303
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
304
304
struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
305
305
struct qce_device * qce = tmpl -> qce ;
306
306
struct scatterlist * sg ;
@@ -328,7 +328,7 @@ static int qce_aead_prepare_buf(struct aead_request *req)
328
328
329
329
static int qce_aead_ccm_prepare_buf (struct aead_request * req )
330
330
{
331
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
331
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
332
332
struct crypto_aead * tfm = crypto_aead_reqtfm (req );
333
333
struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
334
334
struct scatterlist * sg ;
@@ -408,7 +408,7 @@ static int
408
408
qce_aead_async_req_handle (struct crypto_async_request * async_req )
409
409
{
410
410
struct aead_request * req = aead_request_cast (async_req );
411
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
411
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
412
412
struct crypto_aead * tfm = crypto_aead_reqtfm (req );
413
413
struct qce_aead_ctx * ctx = crypto_tfm_ctx (async_req -> tfm );
414
414
struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
@@ -502,7 +502,7 @@ qce_aead_async_req_handle(struct crypto_async_request *async_req)
502
502
static int qce_aead_crypt (struct aead_request * req , int encrypt )
503
503
{
504
504
struct crypto_aead * tfm = crypto_aead_reqtfm (req );
505
- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
505
+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
506
506
struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
507
507
struct qce_alg_template * tmpl = to_aead_tmpl (tfm );
508
508
unsigned int blocksize = crypto_aead_blocksize (tfm );
@@ -675,8 +675,8 @@ static int qce_aead_init(struct crypto_aead *tfm)
675
675
if (IS_ERR (ctx -> fallback ))
676
676
return PTR_ERR (ctx -> fallback );
677
677
678
- crypto_aead_set_reqsize (tfm , sizeof (struct qce_aead_reqctx ) +
679
- crypto_aead_reqsize (ctx -> fallback ));
678
+ crypto_aead_set_reqsize_dma (tfm , sizeof (struct qce_aead_reqctx ) +
679
+ crypto_aead_reqsize (ctx -> fallback ));
680
680
return 0 ;
681
681
}
682
682
0 commit comments