Lines Matching refs:drv_ctx

71 	struct caam_drv_ctx *drv_ctx[NUM_OP];  member
258 if (ctx->drv_ctx[ENCRYPT]) { in aead_setkey()
259 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in aead_setkey()
267 if (ctx->drv_ctx[DECRYPT]) { in aead_setkey()
268 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in aead_setkey()
382 if (ctx->drv_ctx[ENCRYPT]) { in gcm_setkey()
383 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in gcm_setkey()
391 if (ctx->drv_ctx[DECRYPT]) { in gcm_setkey()
392 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in gcm_setkey()
490 if (ctx->drv_ctx[ENCRYPT]) { in rfc4106_setkey()
491 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in rfc4106_setkey()
499 if (ctx->drv_ctx[DECRYPT]) { in rfc4106_setkey()
500 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in rfc4106_setkey()
596 if (ctx->drv_ctx[ENCRYPT]) { in rfc4543_setkey()
597 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in rfc4543_setkey()
605 if (ctx->drv_ctx[DECRYPT]) { in rfc4543_setkey()
606 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in rfc4543_setkey()
643 if (ctx->drv_ctx[ENCRYPT]) { in skcipher_setkey()
644 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in skcipher_setkey()
652 if (ctx->drv_ctx[DECRYPT]) { in skcipher_setkey()
653 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in skcipher_setkey()
764 if (ctx->drv_ctx[ENCRYPT]) { in xts_skcipher_setkey()
765 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT], in xts_skcipher_setkey()
773 if (ctx->drv_ctx[DECRYPT]) { in xts_skcipher_setkey()
774 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT], in xts_skcipher_setkey()
837 struct caam_drv_ctx *drv_ctx = ctx->drv_ctx[type]; in get_drv_ctx() local
840 if (unlikely(!drv_ctx)) { in get_drv_ctx()
844 drv_ctx = ctx->drv_ctx[type]; in get_drv_ctx()
845 if (!drv_ctx) { in get_drv_ctx()
854 drv_ctx = caam_drv_ctx_init(ctx->qidev, &cpu, desc); in get_drv_ctx()
855 if (!IS_ERR(drv_ctx)) in get_drv_ctx()
856 drv_ctx->op_type = type; in get_drv_ctx()
858 ctx->drv_ctx[type] = drv_ctx; in get_drv_ctx()
864 return drv_ctx; in get_drv_ctx()
955 struct caam_drv_ctx *drv_ctx; in aead_edesc_alloc() local
957 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT); in aead_edesc_alloc()
958 if (IS_ERR(drv_ctx)) in aead_edesc_alloc()
959 return (struct aead_edesc *)drv_ctx; in aead_edesc_alloc()
1092 edesc->drv_req.drv_ctx = drv_ctx; in aead_edesc_alloc()
1259 struct caam_drv_ctx *drv_ctx; in skcipher_edesc_alloc() local
1261 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT); in skcipher_edesc_alloc()
1262 if (IS_ERR(drv_ctx)) in skcipher_edesc_alloc()
1263 return (struct skcipher_edesc *)drv_ctx; in skcipher_edesc_alloc()
1358 edesc->drv_req.drv_ctx = drv_ctx; in skcipher_edesc_alloc()
2483 ctx->drv_ctx[ENCRYPT] = NULL; in caam_init_common()
2484 ctx->drv_ctx[DECRYPT] = NULL; in caam_init_common()
2534 caam_drv_ctx_rel(ctx->drv_ctx[ENCRYPT]); in caam_exit_common()
2535 caam_drv_ctx_rel(ctx->drv_ctx[DECRYPT]); in caam_exit_common()