Lines Matching refs:nx_ctx
25 struct nx_crypto_ctx *nx_ctx = crypto_tfm_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()
59 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_aes_nx_crypt() local
60 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_crypt()
65 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in cbc_aes_nx_crypt()
75 rc = nx_build_sg_lists(nx_ctx, desc, dst, src, &to_process, in cbc_aes_nx_crypt()
80 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in cbc_aes_nx_crypt()
85 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in cbc_aes_nx_crypt()
91 atomic_inc(&(nx_ctx->stats->aes_ops)); in cbc_aes_nx_crypt()
93 &(nx_ctx->stats->aes_bytes)); in cbc_aes_nx_crypt()
98 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags); in cbc_aes_nx_crypt()