@@ -24,7 +24,7 @@ static void qce_aead_done(void *data)
2424{
2525 struct crypto_async_request * async_req = data ;
2626 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 );
2828 struct qce_aead_ctx * ctx = crypto_tfm_ctx (async_req -> tfm );
2929 struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
3030 struct qce_device * qce = tmpl -> qce ;
@@ -92,7 +92,7 @@ static void qce_aead_done(void *data)
9292static struct scatterlist *
9393qce_aead_prepare_result_buf (struct sg_table * tbl , struct aead_request * req )
9494{
95- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
95+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
9696 struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
9797 struct qce_device * qce = tmpl -> qce ;
9898
@@ -103,7 +103,7 @@ qce_aead_prepare_result_buf(struct sg_table *tbl, struct aead_request *req)
103103static struct scatterlist *
104104qce_aead_prepare_ccm_result_buf (struct sg_table * tbl , struct aead_request * req )
105105{
106- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
106+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
107107
108108 sg_init_one (& rctx -> result_sg , rctx -> ccmresult_buf , QCE_BAM_BURST_SIZE );
109109 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)
112112static struct scatterlist *
113113qce_aead_prepare_dst_buf (struct aead_request * req )
114114{
115- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
115+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
116116 struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
117117 struct qce_device * qce = tmpl -> qce ;
118118 struct scatterlist * sg , * msg_sg , __sg [2 ];
@@ -186,7 +186,7 @@ qce_aead_ccm_prepare_buf_assoclen(struct aead_request *req)
186186{
187187 struct scatterlist * sg , * msg_sg , __sg [2 ];
188188 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 );
190190 struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
191191 unsigned int assoclen = rctx -> assoclen ;
192192 unsigned int adata_header_len , cryptlen , totallen ;
@@ -300,7 +300,7 @@ qce_aead_ccm_prepare_buf_assoclen(struct aead_request *req)
300300
301301static int qce_aead_prepare_buf (struct aead_request * req )
302302{
303- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
303+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
304304 struct qce_alg_template * tmpl = to_aead_tmpl (crypto_aead_reqtfm (req ));
305305 struct qce_device * qce = tmpl -> qce ;
306306 struct scatterlist * sg ;
@@ -328,7 +328,7 @@ static int qce_aead_prepare_buf(struct aead_request *req)
328328
329329static int qce_aead_ccm_prepare_buf (struct aead_request * req )
330330{
331- struct qce_aead_reqctx * rctx = aead_request_ctx (req );
331+ struct qce_aead_reqctx * rctx = aead_request_ctx_dma (req );
332332 struct crypto_aead * tfm = crypto_aead_reqtfm (req );
333333 struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
334334 struct scatterlist * sg ;
@@ -408,7 +408,7 @@ static int
408408qce_aead_async_req_handle (struct crypto_async_request * async_req )
409409{
410410 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 );
412412 struct crypto_aead * tfm = crypto_aead_reqtfm (req );
413413 struct qce_aead_ctx * ctx = crypto_tfm_ctx (async_req -> tfm );
414414 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)
502502static int qce_aead_crypt (struct aead_request * req , int encrypt )
503503{
504504 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 );
506506 struct qce_aead_ctx * ctx = crypto_aead_ctx (tfm );
507507 struct qce_alg_template * tmpl = to_aead_tmpl (tfm );
508508 unsigned int blocksize = crypto_aead_blocksize (tfm );
@@ -675,8 +675,8 @@ static int qce_aead_init(struct crypto_aead *tfm)
675675 if (IS_ERR (ctx -> fallback ))
676676 return PTR_ERR (ctx -> fallback );
677677
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 ));
680680 return 0 ;
681681}
682682
0 commit comments