Lines Matching refs:pd_uinfo
188 struct pd_uinfo *pd_uinfo; in crypto4xx_build_pdr() local
195 dev->pdr_uinfo = kzalloc(sizeof(struct pd_uinfo) * PPC4XX_NUM_PD, in crypto4xx_build_pdr()
218 pd_uinfo = (struct pd_uinfo *) (dev->pdr_uinfo + in crypto4xx_build_pdr()
219 sizeof(struct pd_uinfo) * i); in crypto4xx_build_pdr()
222 pd_uinfo->sa_va = dev->shadow_sa_pool + 256 * i; in crypto4xx_build_pdr()
223 pd_uinfo->sa_pa = dev->shadow_sa_pool_pa + 256 * i; in crypto4xx_build_pdr()
226 pd_uinfo->sr_va = dev->shadow_sr_pool + in crypto4xx_build_pdr()
228 pd_uinfo->sr_pa = dev->shadow_sr_pool_pa + in crypto4xx_build_pdr()
270 struct pd_uinfo *pd_uinfo; in crypto4xx_put_pd_to_pdr() local
273 pd_uinfo = (struct pd_uinfo *)(dev->pdr_uinfo + in crypto4xx_put_pd_to_pdr()
274 sizeof(struct pd_uinfo) * idx); in crypto4xx_put_pd_to_pdr()
280 pd_uinfo->state = PD_ENTRY_FREE; in crypto4xx_put_pd_to_pdr()
535 struct pd_uinfo *pd_uinfo, in crypto4xx_copy_pkt_to_dst() argument
547 this_sd = pd_uinfo->first_sd; in crypto4xx_copy_pkt_to_dst()
586 static u32 crypto4xx_copy_digest_to_dst(struct pd_uinfo *pd_uinfo, in crypto4xx_copy_digest_to_dst() argument
591 (struct sa_state_record *) pd_uinfo->sr_va; in crypto4xx_copy_digest_to_dst()
594 memcpy((void *) pd_uinfo->dest_va, state_record->save_digest, in crypto4xx_copy_digest_to_dst()
602 struct pd_uinfo *pd_uinfo) in crypto4xx_ret_sg_desc() argument
605 if (pd_uinfo->num_gd) { in crypto4xx_ret_sg_desc()
606 for (i = 0; i < pd_uinfo->num_gd; i++) in crypto4xx_ret_sg_desc()
608 pd_uinfo->first_gd = 0xffffffff; in crypto4xx_ret_sg_desc()
609 pd_uinfo->num_gd = 0; in crypto4xx_ret_sg_desc()
611 if (pd_uinfo->num_sd) { in crypto4xx_ret_sg_desc()
612 for (i = 0; i < pd_uinfo->num_sd; i++) in crypto4xx_ret_sg_desc()
615 pd_uinfo->first_sd = 0xffffffff; in crypto4xx_ret_sg_desc()
616 pd_uinfo->num_sd = 0; in crypto4xx_ret_sg_desc()
621 struct pd_uinfo *pd_uinfo, in crypto4xx_ablkcipher_done() argument
629 ablk_req = ablkcipher_request_cast(pd_uinfo->async_req); in crypto4xx_ablkcipher_done()
632 if (pd_uinfo->using_sd) { in crypto4xx_ablkcipher_done()
633 crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo, ablk_req->nbytes, in crypto4xx_ablkcipher_done()
636 dst = pd_uinfo->dest_va; in crypto4xx_ablkcipher_done()
640 crypto4xx_ret_sg_desc(dev, pd_uinfo); in crypto4xx_ablkcipher_done()
648 struct pd_uinfo *pd_uinfo) in crypto4xx_ahash_done() argument
653 ahash_req = ahash_request_cast(pd_uinfo->async_req); in crypto4xx_ahash_done()
656 crypto4xx_copy_digest_to_dst(pd_uinfo, in crypto4xx_ahash_done()
658 crypto4xx_ret_sg_desc(dev, pd_uinfo); in crypto4xx_ahash_done()
669 struct pd_uinfo *pd_uinfo; in crypto4xx_pd_done() local
672 pd_uinfo = dev->pdr_uinfo + sizeof(struct pd_uinfo)*idx; in crypto4xx_pd_done()
673 if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) == in crypto4xx_pd_done()
675 return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd); in crypto4xx_pd_done()
677 return crypto4xx_ahash_done(dev, pd_uinfo); in crypto4xx_pd_done()
729 struct pd_uinfo *pd_uinfo) in crypto4xx_return_pd() argument
735 pd_uinfo->state = PD_ENTRY_FREE; in crypto4xx_return_pd()
792 struct pd_uinfo *pd_uinfo = NULL; in crypto4xx_build_pd() local
849 pd_uinfo = (struct pd_uinfo *)(dev->pdr_uinfo + in crypto4xx_build_pd()
850 sizeof(struct pd_uinfo) * pd_entry); in crypto4xx_build_pd()
852 pd_uinfo->async_req = req; in crypto4xx_build_pd()
853 pd_uinfo->num_gd = num_gd; in crypto4xx_build_pd()
854 pd_uinfo->num_sd = num_sd; in crypto4xx_build_pd()
858 pd->sa = pd_uinfo->sa_pa; in crypto4xx_build_pd()
859 sa = (struct dynamic_sa_ctl *) pd_uinfo->sa_va; in crypto4xx_build_pd()
866 &pd_uinfo->sr_pa, 4); in crypto4xx_build_pd()
869 crypto4xx_memcpy_le(pd_uinfo->sr_va, iv, iv_len); in crypto4xx_build_pd()
883 pd_uinfo->first_gd = fst_gd; in crypto4xx_build_pd()
884 pd_uinfo->num_gd = num_gd; in crypto4xx_build_pd()
917 pd_uinfo->first_gd = 0xffffffff; in crypto4xx_build_pd()
918 pd_uinfo->num_gd = 0; in crypto4xx_build_pd()
926 pd_uinfo->using_sd = 0; in crypto4xx_build_pd()
927 pd_uinfo->first_sd = 0xffffffff; in crypto4xx_build_pd()
928 pd_uinfo->num_sd = 0; in crypto4xx_build_pd()
929 pd_uinfo->dest_va = dst; in crypto4xx_build_pd()
942 pd_uinfo->using_sd = 1; in crypto4xx_build_pd()
943 pd_uinfo->dest_va = dst; in crypto4xx_build_pd()
944 pd_uinfo->first_sd = fst_sd; in crypto4xx_build_pd()
945 pd_uinfo->num_sd = num_sd; in crypto4xx_build_pd()
977 pd_uinfo->state = PD_ENTRY_INUSE; in crypto4xx_build_pd()
1080 struct pd_uinfo *pd_uinfo; in crypto4xx_bh_tasklet_cb() local
1086 pd_uinfo = core_dev->dev->pdr_uinfo + in crypto4xx_bh_tasklet_cb()
1087 sizeof(struct pd_uinfo)*tail; in crypto4xx_bh_tasklet_cb()
1089 if ((pd_uinfo->state == PD_ENTRY_INUSE) && in crypto4xx_bh_tasklet_cb()
1095 pd_uinfo->state = PD_ENTRY_FREE; in crypto4xx_bh_tasklet_cb()