Lines Matching defs:rctx
74 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
84 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm);
85 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags,
87 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst,
89 if (rctx->op_dir & SS_DECRYPTION)
90 err = crypto_skcipher_decrypt(&rctx->fallback_req);
92 err = crypto_skcipher_encrypt(&rctx->fallback_req);
101 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
106 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow];
111 rctx->ivlen = ivsize;
112 if (rctx->op_dir & SS_DECRYPTION) {
133 rctx->p_iv[i] = a;
135 if (rctx->op_dir == SS_ENCRYPTION)
144 rctx->niv = i;
152 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE);
164 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
167 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow];
180 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm),
187 rctx->op_mode = ss->variant->op_mode[algt->ss_blockmode];
188 rctx->method = ss->variant->alg_cipher[algt->ss_algo_id];
189 rctx->keylen = op->keylen;
191 rctx->p_key = dma_map_single(ss->dev, op->key, op->keylen, DMA_TO_DEVICE);
192 if (dma_mapping_error(ss->dev, rctx->p_key)) {
236 rctx->t_src[i].addr = sg_dma_address(sg);
238 rctx->t_src[i].len = todo / 4;
240 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo);
258 rctx->t_dst[i].addr = sg_dma_address(sg);
260 rctx->t_dst[i].len = todo / 4;
262 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo);
274 err = sun8i_ss_run_task(ss, rctx, crypto_tfm_alg_name(areq->base.tfm));
286 for (i = 0; i < rctx->niv; i++) {
287 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE);
292 if (rctx->op_dir & SS_DECRYPTION) {
302 dma_unmap_single(ss->dev, rctx->p_key, op->keylen, DMA_TO_DEVICE);
326 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
330 memset(rctx, 0, sizeof(struct sun8i_cipher_req_ctx));
331 rctx->op_dir = SS_DECRYPTION;
338 rctx->flow = e;
347 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
351 memset(rctx, 0, sizeof(struct sun8i_cipher_req_ctx));
352 rctx->op_dir = SS_ENCRYPTION;
359 rctx->flow = e;