Lines Matching refs:sg_count

905 static int sg_to_link_tbl(struct scatterlist *sg, int sg_count,  in sg_to_link_tbl()  argument
908 int n_sg = sg_count; in sg_to_link_tbl()
925 sg_count--; in sg_to_link_tbl()
934 return sg_count; in sg_to_link_tbl()
952 int sg_count, ret; in ipsec_esp() local
970 sg_count = sg_to_link_tbl(areq->assoc, edesc->assoc_nents - 1, in ipsec_esp()
974 tbl_ptr += sg_count - 1; in ipsec_esp()
1013 sg_count = talitos_map_sg(dev, areq->src, edesc->src_nents ? : 1, in ipsec_esp()
1018 if (sg_count == 1) { in ipsec_esp()
1026 sg_count = sg_to_link_tbl(areq->src, sg_count, sg_link_tbl_len, in ipsec_esp()
1028 if (sg_count > 1) { in ipsec_esp()
1046 sg_count = talitos_map_sg(dev, areq->dst, in ipsec_esp()
1050 if (sg_count == 1) { in ipsec_esp()
1058 sg_count = sg_to_link_tbl(areq->dst, sg_count, cryptlen, in ipsec_esp()
1062 tbl_ptr += sg_count - 1; in ipsec_esp()
1093 static int sg_count(struct scatterlist *sg_list, int nbytes, bool *chained) in sg_count() function
1148 assoc_nents = sg_count(assoc, assoclen, &assoc_chained); in talitos_edesc_alloc()
1158 src_nents = sg_count(src, cryptlen + authsize, &src_chained); in talitos_edesc_alloc()
1162 src_nents = sg_count(src, cryptlen + (encrypt ? 0 : authsize), in talitos_edesc_alloc()
1165 dst_nents = sg_count(dst, cryptlen + (encrypt ? authsize : 0), in talitos_edesc_alloc()
1374 int sg_count, ret; in common_nonsnoop() local
1396 sg_count = talitos_map_sg(dev, areq->src, edesc->src_nents ? : 1, in common_nonsnoop()
1401 if (sg_count == 1) { in common_nonsnoop()
1404 sg_count = sg_to_link_tbl(areq->src, sg_count, cryptlen, in common_nonsnoop()
1406 if (sg_count > 1) { in common_nonsnoop()
1424 sg_count = talitos_map_sg(dev, areq->dst, in common_nonsnoop()
1428 if (sg_count == 1) { in common_nonsnoop()
1438 sg_count = sg_to_link_tbl(areq->dst, sg_count, cryptlen, in common_nonsnoop()
1563 int sg_count, ret; in common_nonsnoop_hash() local
1594 sg_count = talitos_map_sg(dev, req_ctx->psrc, in common_nonsnoop_hash()
1598 if (sg_count == 1) { in common_nonsnoop_hash()
1601 sg_count = sg_to_link_tbl(req_ctx->psrc, sg_count, length, in common_nonsnoop_hash()
1603 if (sg_count > 1) { in common_nonsnoop_hash()
1712 sg_count(areq->src, nbytes, &chained), in ahash_process_req()
1745 int nents = sg_count(areq->src, nbytes, &chained); in ahash_process_req()