Lines Matching refs:nx_ctx

31 	struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(desc);
32 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
36 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128];
60 struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(desc->tfm);
61 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
80 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) keys, &len,
81 nx_ctx->ap->sglen);
86 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *) keys, &len,
87 nx_ctx->ap->sglen);
92 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg);
93 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
95 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0);
98 atomic_inc(&(nx_ctx->stats->aes_ops));
107 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) keys[1], &len,
108 nx_ctx->ap->sglen);
114 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len,
115 nx_ctx->ap->sglen);
120 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg);
121 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
123 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0);
126 atomic_inc(&(nx_ctx->stats->aes_ops));
139 struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(tfm);
140 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
147 nx_ctx_init(nx_ctx, HCOP_FC_AES);
168 struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(desc->tfm);
170 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
179 spin_lock_irqsave(&nx_ctx->lock, irq_flags);
187 in_sg = nx_ctx->in_sg;
189 nx_ctx->ap->sglen);
191 nx_ctx->ap->databytelen/NX_PAGE_SIZE);
194 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
195 &data_len, nx_ctx->ap->sglen);
202 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
212 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) *
220 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) {
225 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0);
229 atomic_inc(&(nx_ctx->stats->aes_ops));
233 in_sg = nx_ctx->in_sg;
240 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags);
247 struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(desc->tfm);
249 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
255 spin_lock_irqsave(&nx_ctx->lock, irq_flags);
275 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *)src, &len,
276 nx_ctx->ap->sglen);
284 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len,
285 nx_ctx->ap->sglen);
292 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg);
293 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
295 if (!nx_ctx->op.outlen) {
300 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0);
304 atomic_inc(&(nx_ctx->stats->aes_ops));
308 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags);