Lines Matching refs:bufcnt
151 size_t bufcnt; member
657 if (ctx->bufcnt) in omap_sham_copy_sg_lists()
670 if (ctx->bufcnt) { in omap_sham_copy_sg_lists()
671 sg_set_buf(tmp, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sg_lists()
674 new_len -= ctx->bufcnt; in omap_sham_copy_sg_lists()
708 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sg_lists()
709 ctx->bufcnt = 0; in omap_sham_copy_sg_lists()
729 if (ctx->bufcnt) in omap_sham_copy_sgs()
730 memcpy(buf, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sgs()
732 scatterwalk_map_and_copy(buf + ctx->bufcnt, sg, ctx->offset, in omap_sham_copy_sgs()
733 min(new_len, ctx->total) - ctx->bufcnt, 0); in omap_sham_copy_sgs()
739 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sgs()
740 ctx->bufcnt = 0; in omap_sham_copy_sgs()
756 int bufcnt = rctx->bufcnt; in omap_sham_align_sgs() local
759 if (bufcnt) { in omap_sham_align_sgs()
760 bufcnt = DIV_ROUND_UP(bufcnt, bs) * bs; in omap_sham_align_sgs()
762 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, bufcnt); in omap_sham_align_sgs()
789 if (bufcnt) { in omap_sham_align_sgs()
790 if (!IS_ALIGNED(bufcnt, bs)) { in omap_sham_align_sgs()
794 nbytes -= bufcnt; in omap_sham_align_sgs()
795 bufcnt = 0; in omap_sham_align_sgs()
852 if (rctx->bufcnt) { in omap_sham_align_sgs()
854 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, rctx->bufcnt); in omap_sham_align_sgs()
878 nbytes = rctx->bufcnt; in omap_sham_prepare_request()
886 rctx->bufcnt); in omap_sham_prepare_request()
893 if (update && req->nbytes && (!IS_ALIGNED(rctx->bufcnt, bs))) { in omap_sham_prepare_request()
894 int len = bs - rctx->bufcnt % bs; in omap_sham_prepare_request()
898 scatterwalk_map_and_copy(rctx->buffer + rctx->bufcnt, req->src, in omap_sham_prepare_request()
900 rctx->bufcnt += len; in omap_sham_prepare_request()
904 if (rctx->bufcnt) in omap_sham_prepare_request()
905 memcpy(rctx->dd->xmit_buf, rctx->buffer, rctx->bufcnt); in omap_sham_prepare_request()
921 rctx->bufcnt = hash_later; in omap_sham_prepare_request()
923 rctx->bufcnt = 0; in omap_sham_prepare_request()
1007 ctx->bufcnt = 0; in omap_sham_init()
1018 ctx->bufcnt = bs; in omap_sham_init()
1075 ctx->bufcnt = 0; in omap_sham_final_req()
1143 dev_dbg(dd->dev, "digcnt: %zd, bufcnt: %zd\n", ctx->digcnt, ctx->bufcnt); in omap_sham_finish()
1218 if (ctx->bufcnt + req->nbytes <= ctx->buflen) { in omap_sham_update()
1219 scatterwalk_map_and_copy(ctx->buffer + ctx->bufcnt, req->src, in omap_sham_update()
1221 ctx->bufcnt += req->nbytes; in omap_sham_update()
1247 ctx->bufcnt - offset, req->result); in omap_sham_final_shash()
1266 if (!ctx->digcnt && ctx->bufcnt < ctx->dd->fallback_sz) in omap_sham_final()
1268 else if (ctx->bufcnt) in omap_sham_final()
1426 memcpy(out, rctx, sizeof(*rctx) + rctx->bufcnt); in omap_sham_export()
1436 memcpy(rctx, in, sizeof(*rctx) + ctx_in->bufcnt); in omap_sham_import()