Lines Matching defs:drv_ctx
71 struct caam_drv_ctx *drv_ctx[NUM_OP];
258 if (ctx->drv_ctx[ENCRYPT]) {
259 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
267 if (ctx->drv_ctx[DECRYPT]) {
268 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
382 if (ctx->drv_ctx[ENCRYPT]) {
383 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
391 if (ctx->drv_ctx[DECRYPT]) {
392 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
490 if (ctx->drv_ctx[ENCRYPT]) {
491 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
499 if (ctx->drv_ctx[DECRYPT]) {
500 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
596 if (ctx->drv_ctx[ENCRYPT]) {
597 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
605 if (ctx->drv_ctx[DECRYPT]) {
606 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
643 if (ctx->drv_ctx[ENCRYPT]) {
644 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
652 if (ctx->drv_ctx[DECRYPT]) {
653 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
764 if (ctx->drv_ctx[ENCRYPT]) {
765 ret = caam_drv_ctx_update(ctx->drv_ctx[ENCRYPT],
773 if (ctx->drv_ctx[DECRYPT]) {
774 ret = caam_drv_ctx_update(ctx->drv_ctx[DECRYPT],
837 struct caam_drv_ctx *drv_ctx = ctx->drv_ctx[type];
840 if (unlikely(!drv_ctx)) {
843 /* Read again to check if some other core init drv_ctx */
844 drv_ctx = ctx->drv_ctx[type];
845 if (!drv_ctx) {
854 drv_ctx = caam_drv_ctx_init(ctx->qidev, &cpu, desc);
855 if (!IS_ERR_OR_NULL(drv_ctx))
856 drv_ctx->op_type = type;
858 ctx->drv_ctx[type] = drv_ctx;
864 return drv_ctx;
955 struct caam_drv_ctx *drv_ctx;
957 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT);
958 if (IS_ERR_OR_NULL(drv_ctx))
959 return (struct aead_edesc *)drv_ctx;
1092 edesc->drv_req.drv_ctx = drv_ctx;
1259 struct caam_drv_ctx *drv_ctx;
1261 drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT);
1262 if (IS_ERR_OR_NULL(drv_ctx))
1263 return (struct skcipher_edesc *)drv_ctx;
1358 edesc->drv_req.drv_ctx = drv_ctx;
2483 ctx->drv_ctx[ENCRYPT] = NULL;
2484 ctx->drv_ctx[DECRYPT] = NULL;
2534 caam_drv_ctx_rel(ctx->drv_ctx[ENCRYPT]);
2535 caam_drv_ctx_rel(ctx->drv_ctx[DECRYPT]);