Lines Matching refs:pd_uinfo

176 	dev->pdr_uinfo = kcalloc(PPC4XX_NUM_PD, sizeof(struct pd_uinfo),  in crypto4xx_build_pdr()
199 struct pd_uinfo *pd_uinfo = &dev->pdr_uinfo[i]; in crypto4xx_build_pdr() local
205 pd_uinfo->sa_va = &dev->shadow_sa_pool[i].sa; in crypto4xx_build_pdr()
208 pd_uinfo->sr_va = &dev->shadow_sr_pool[i]; in crypto4xx_build_pdr()
209 pd_uinfo->sr_pa = dev->shadow_sr_pool_pa + in crypto4xx_build_pdr()
254 struct pd_uinfo *pd_uinfo = &dev->pdr_uinfo[idx]; in crypto4xx_put_pd_to_pdr() local
259 pd_uinfo->state = PD_ENTRY_FREE; in crypto4xx_put_pd_to_pdr()
448 struct pd_uinfo *pd_uinfo, in crypto4xx_copy_pkt_to_dst() argument
452 unsigned int first_sd = pd_uinfo->first_sd; in crypto4xx_copy_pkt_to_dst()
464 last_sd = (first_sd + pd_uinfo->num_sd); in crypto4xx_copy_pkt_to_dst()
489 struct pd_uinfo *pd_uinfo, in crypto4xx_copy_digest_to_dst() argument
495 memcpy(dst, pd_uinfo->sr_va->save_digest, in crypto4xx_copy_digest_to_dst()
501 struct pd_uinfo *pd_uinfo) in crypto4xx_ret_sg_desc() argument
504 if (pd_uinfo->num_gd) { in crypto4xx_ret_sg_desc()
505 for (i = 0; i < pd_uinfo->num_gd; i++) in crypto4xx_ret_sg_desc()
507 pd_uinfo->first_gd = 0xffffffff; in crypto4xx_ret_sg_desc()
508 pd_uinfo->num_gd = 0; in crypto4xx_ret_sg_desc()
510 if (pd_uinfo->num_sd) { in crypto4xx_ret_sg_desc()
511 for (i = 0; i < pd_uinfo->num_sd; i++) in crypto4xx_ret_sg_desc()
514 pd_uinfo->first_sd = 0xffffffff; in crypto4xx_ret_sg_desc()
515 pd_uinfo->num_sd = 0; in crypto4xx_ret_sg_desc()
520 struct pd_uinfo *pd_uinfo, in crypto4xx_cipher_done() argument
526 req = skcipher_request_cast(pd_uinfo->async_req); in crypto4xx_cipher_done()
528 if (pd_uinfo->sa_va->sa_command_0.bf.scatter) { in crypto4xx_cipher_done()
529 crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo, in crypto4xx_cipher_done()
532 dst = pd_uinfo->dest_va; in crypto4xx_cipher_done()
537 if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) { in crypto4xx_cipher_done()
541 pd_uinfo->sr_va->save_iv, in crypto4xx_cipher_done()
545 crypto4xx_ret_sg_desc(dev, pd_uinfo); in crypto4xx_cipher_done()
547 if (pd_uinfo->state & PD_ENTRY_BUSY) in crypto4xx_cipher_done()
553 struct pd_uinfo *pd_uinfo) in crypto4xx_ahash_done() argument
558 ahash_req = ahash_request_cast(pd_uinfo->async_req); in crypto4xx_ahash_done()
561 crypto4xx_copy_digest_to_dst(ahash_req->result, pd_uinfo, ctx); in crypto4xx_ahash_done()
562 crypto4xx_ret_sg_desc(dev, pd_uinfo); in crypto4xx_ahash_done()
564 if (pd_uinfo->state & PD_ENTRY_BUSY) in crypto4xx_ahash_done()
570 struct pd_uinfo *pd_uinfo, in crypto4xx_aead_done() argument
573 struct aead_request *aead_req = container_of(pd_uinfo->async_req, in crypto4xx_aead_done()
575 struct scatterlist *dst = pd_uinfo->dest_va; in crypto4xx_aead_done()
581 if (pd_uinfo->sa_va->sa_command_0.bf.scatter) { in crypto4xx_aead_done()
582 crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo, in crypto4xx_aead_done()
590 if (pd_uinfo->sa_va->sa_command_0.bf.dir == DIR_OUTBOUND) { in crypto4xx_aead_done()
592 crypto4xx_memcpy_from_le32(icv, pd_uinfo->sr_va->save_digest, in crypto4xx_aead_done()
605 if (crypto_memneq(icv, pd_uinfo->sr_va->save_digest, cp_len)) in crypto4xx_aead_done()
609 crypto4xx_ret_sg_desc(dev, pd_uinfo); in crypto4xx_aead_done()
627 if (pd_uinfo->state & PD_ENTRY_BUSY) in crypto4xx_aead_done()
636 struct pd_uinfo *pd_uinfo = &dev->pdr_uinfo[idx]; in crypto4xx_pd_done() local
638 switch (crypto_tfm_alg_type(pd_uinfo->async_req->tfm)) { in crypto4xx_pd_done()
640 crypto4xx_cipher_done(dev, pd_uinfo, pd); in crypto4xx_pd_done()
643 crypto4xx_aead_done(dev, pd_uinfo, pd); in crypto4xx_pd_done()
646 crypto4xx_ahash_done(dev, pd_uinfo); in crypto4xx_pd_done()
697 struct pd_uinfo *pd_uinfo; in crypto4xx_build_pd() local
810 pd_uinfo = &dev->pdr_uinfo[pd_entry]; in crypto4xx_build_pd()
811 pd_uinfo->num_gd = num_gd; in crypto4xx_build_pd()
812 pd_uinfo->num_sd = num_sd; in crypto4xx_build_pd()
813 pd_uinfo->dest_va = dst; in crypto4xx_build_pd()
814 pd_uinfo->async_req = req; in crypto4xx_build_pd()
817 memcpy(pd_uinfo->sr_va->save_iv, iv, iv_len); in crypto4xx_build_pd()
819 sa = pd_uinfo->sa_va; in crypto4xx_build_pd()
824 *(u32 *)((unsigned long)sa + offset_to_sr_ptr) = pd_uinfo->sr_pa; in crypto4xx_build_pd()
832 pd_uinfo->first_gd = fst_gd; in crypto4xx_build_pd()
868 pd_uinfo->first_gd = 0xffffffff; in crypto4xx_build_pd()
875 pd_uinfo->first_sd = 0xffffffff; in crypto4xx_build_pd()
888 pd_uinfo->first_sd = fst_sd; in crypto4xx_build_pd()
922 pd_uinfo->state = PD_ENTRY_INUSE | (is_busy ? PD_ENTRY_BUSY : 0); in crypto4xx_build_pd()
1077 struct pd_uinfo *pd_uinfo; in crypto4xx_bh_tasklet_cb() local
1083 pd_uinfo = &core_dev->dev->pdr_uinfo[tail]; in crypto4xx_bh_tasklet_cb()
1085 if ((pd_uinfo->state & PD_ENTRY_INUSE) && in crypto4xx_bh_tasklet_cb()