Lines Matching refs:drv_ctx

76 	struct caam_drv_ctx *drv_ctx[NUM_OP];  member
263 if (ctx->drv_ctx[ENCRYPT]) { in aead_setkey()
264 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in aead_setkey()
272 if (ctx->drv_ctx[DECRYPT]) { in aead_setkey()
273 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in aead_setkey()
387 if (ctx->drv_ctx[ENCRYPT]) { in gcm_setkey()
388 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in gcm_setkey()
396 if (ctx->drv_ctx[DECRYPT]) { in gcm_setkey()
397 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in gcm_setkey()
495 if (ctx->drv_ctx[ENCRYPT]) { in rfc4106_setkey()
496 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in rfc4106_setkey()
504 if (ctx->drv_ctx[DECRYPT]) { in rfc4106_setkey()
505 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in rfc4106_setkey()
601 if (ctx->drv_ctx[ENCRYPT]) { in rfc4543_setkey()
602 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in rfc4543_setkey()
610 if (ctx->drv_ctx[DECRYPT]) { in rfc4543_setkey()
611 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in rfc4543_setkey()
648 if (ctx->drv_ctx[ENCRYPT]) { in skcipher_setkey()
649 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in skcipher_setkey()
657 if (ctx->drv_ctx[DECRYPT]) { in skcipher_setkey()
658 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in skcipher_setkey()
769 if (ctx->drv_ctx[ENCRYPT]) { in xts_skcipher_setkey()
770 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in xts_skcipher_setkey()
778 if (ctx->drv_ctx[DECRYPT]) { in xts_skcipher_setkey()
779 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in xts_skcipher_setkey()
842 struct caam_drv_ctx *drv_ctx = ctx->drv_ctx[type]; in get_drv_ctx() local
845 if (unlikely(!drv_ctx)) { in get_drv_ctx()
849 drv_ctx = ctx->drv_ctx[type]; in get_drv_ctx()
850 if (!drv_ctx) { in get_drv_ctx()
859 drv_ctx = caam_drv_ctx_init(ctx->qidev, &cpu, desc); in get_drv_ctx()
860 if (!IS_ERR(drv_ctx)) in get_drv_ctx()
861 drv_ctx->op_type = type; in get_drv_ctx()
863 ctx->drv_ctx[type] = drv_ctx; in get_drv_ctx()
869 return drv_ctx; in get_drv_ctx()
960 struct caam_drv_ctx *drv_ctx; in aead_edesc_alloc() local
962 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT); in aead_edesc_alloc()
963 if (IS_ERR(drv_ctx)) in aead_edesc_alloc()
964 return (struct aead_edesc *)drv_ctx; in aead_edesc_alloc()
1097 edesc->drv_req.drv_ctx = drv_ctx; in aead_edesc_alloc()
1269 struct caam_drv_ctx *drv_ctx; in skcipher_edesc_alloc() local
1272 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT); in skcipher_edesc_alloc()
1273 if (IS_ERR(drv_ctx)) in skcipher_edesc_alloc()
1274 return (struct skcipher_edesc *)drv_ctx; in skcipher_edesc_alloc()
1358 edesc->drv_req.drv_ctx = drv_ctx; in skcipher_edesc_alloc()
2499 ctx->drv_ctx[ENCRYPT] = NULL; in caam_init_common()
2500 ctx->drv_ctx[DECRYPT] = NULL; in caam_init_common()
2550 caam_drv_ctx_rel(ctx->drv_ctx[ENCRYPT]); in caam_exit_common()
2551 caam_drv_ctx_rel(ctx->drv_ctx[DECRYPT]); in caam_exit_common()