Lines Matching refs:nx_ctx
25 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in cbc_aes_nx_set_key() local
26 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_set_key()
28 nx_ctx_init(nx_ctx, HCOP_FC_AES); in cbc_aes_nx_set_key()
33 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in cbc_aes_nx_set_key()
37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in cbc_aes_nx_set_key()
41 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in cbc_aes_nx_set_key()
57 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in cbc_aes_nx_crypt() local
58 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_crypt()
63 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in cbc_aes_nx_crypt()
73 rc = nx_build_sg_lists(nx_ctx, req->iv, req->dst, req->src, in cbc_aes_nx_crypt()
79 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in cbc_aes_nx_crypt()
84 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in cbc_aes_nx_crypt()
90 atomic_inc(&(nx_ctx->stats->aes_ops)); in cbc_aes_nx_crypt()
92 &(nx_ctx->stats->aes_bytes)); in cbc_aes_nx_crypt()
97 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags); in cbc_aes_nx_crypt()