Lines Matching refs:rctx

75 	struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
79 memset(rctx, 0, sizeof(struct sun8i_ss_hash_reqctx));
81 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
82 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
84 return crypto_ahash_init(&rctx->fallback_req);
89 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
93 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
94 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
96 return crypto_ahash_export(&rctx->fallback_req, out);
101 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
105 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
106 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP;
108 return crypto_ahash_import(&rctx->fallback_req, in);
113 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
121 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
122 rctx->fallback_req.base.flags = areq->base.flags &
124 rctx->fallback_req.result = areq->result;
131 return crypto_ahash_final(&rctx->fallback_req);
136 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
140 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
141 rctx->fallback_req.base.flags = areq->base.flags &
143 rctx->fallback_req.nbytes = areq->nbytes;
144 rctx->fallback_req.src = areq->src;
146 return crypto_ahash_update(&rctx->fallback_req);
151 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
159 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
160 rctx->fallback_req.base.flags = areq->base.flags &
163 rctx->fallback_req.nbytes = areq->nbytes;
164 rctx->fallback_req.src = areq->src;
165 rctx->fallback_req.result = areq->result;
171 return crypto_ahash_finup(&rctx->fallback_req);
176 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
184 ahash_request_set_tfm(&rctx->fallback_req, tfmctx->fallback_tfm);
185 rctx->fallback_req.base.flags = areq->base.flags &
188 rctx->fallback_req.nbytes = areq->nbytes;
189 rctx->fallback_req.src = areq->src;
190 rctx->fallback_req.result = areq->result;
196 return crypto_ahash_digest(&rctx->fallback_req);
200 struct sun8i_ss_hash_reqctx *rctx,
203 int flow = rctx->flow;
217 v |= rctx->method;
220 if (!rctx->t_dst[i].addr)
226 writel(rctx->t_dst[i - 1].addr, ss->base + SS_KEY_ADR_REG);
227 writel(rctx->t_dst[i - 1].addr, ss->base + SS_IV_ADR_REG);
233 rctx->t_src[i].len, rctx->t_dst[i].len,
234 rctx->method, rctx->t_src[i].addr, rctx->t_dst[i].addr);
236 writel(rctx->t_src[i].addr, ss->base + SS_SRC_ADR_REG);
237 writel(rctx->t_dst[i].addr, ss->base + SS_DST_ADR_REG);
238 writel(rctx->t_src[i].len, ss->base + SS_LEN_ADR_REG);
286 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
309 rctx->flow = e;
323 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
344 result = ss->flows[rctx->flow].result;
345 pad = ss->flows[rctx->flow].pad;
350 rctx->t_dst[i].addr = 0;
351 rctx->t_dst[i].len = 0;
358 rctx->method = ss->variant->alg_hash[algt->ss_algo_id];
382 rctx->t_src[i].addr = sg_dma_address(sg);
384 rctx->t_src[i].len = todo / 4;
386 rctx->t_dst[i].addr = addr_res;
387 rctx->t_dst[i].len = digestsize / 4;
425 rctx->t_src[i].addr = addr_pad;
426 rctx->t_src[i].len = j;
427 rctx->t_dst[i].addr = addr_res;
428 rctx->t_dst[i].len = digestsize / 4;
435 err = sun8i_ss_run_hash_task(ss, rctx, crypto_tfm_alg_name(areq->base.tfm));