Lines Matching refs:bufcnt
147 size_t bufcnt; member
634 if (ctx->bufcnt) in omap_sham_copy_sg_lists()
647 if (ctx->bufcnt) { in omap_sham_copy_sg_lists()
648 sg_set_buf(tmp, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sg_lists()
651 new_len -= ctx->bufcnt; in omap_sham_copy_sg_lists()
685 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sg_lists()
686 ctx->bufcnt = 0; in omap_sham_copy_sg_lists()
706 if (ctx->bufcnt) in omap_sham_copy_sgs()
707 memcpy(buf, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sgs()
709 scatterwalk_map_and_copy(buf + ctx->bufcnt, sg, ctx->offset, in omap_sham_copy_sgs()
710 min(new_len, ctx->total) - ctx->bufcnt, 0); in omap_sham_copy_sgs()
716 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sgs()
717 ctx->bufcnt = 0; in omap_sham_copy_sgs()
733 int bufcnt = rctx->bufcnt; in omap_sham_align_sgs() local
736 if (bufcnt) { in omap_sham_align_sgs()
737 bufcnt = DIV_ROUND_UP(bufcnt, bs) * bs; in omap_sham_align_sgs()
739 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, bufcnt); in omap_sham_align_sgs()
766 if (bufcnt) { in omap_sham_align_sgs()
767 if (!IS_ALIGNED(bufcnt, bs)) { in omap_sham_align_sgs()
771 nbytes -= bufcnt; in omap_sham_align_sgs()
772 bufcnt = 0; in omap_sham_align_sgs()
829 if (rctx->bufcnt) { in omap_sham_align_sgs()
831 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, rctx->bufcnt); in omap_sham_align_sgs()
855 nbytes = rctx->bufcnt; in omap_sham_prepare_request()
863 rctx->bufcnt); in omap_sham_prepare_request()
870 if (update && req->nbytes && (!IS_ALIGNED(rctx->bufcnt, bs))) { in omap_sham_prepare_request()
871 int len = bs - rctx->bufcnt % bs; in omap_sham_prepare_request()
875 scatterwalk_map_and_copy(rctx->buffer + rctx->bufcnt, req->src, in omap_sham_prepare_request()
877 rctx->bufcnt += len; in omap_sham_prepare_request()
881 if (rctx->bufcnt) in omap_sham_prepare_request()
882 memcpy(rctx->dd->xmit_buf, rctx->buffer, rctx->bufcnt); in omap_sham_prepare_request()
898 rctx->bufcnt = hash_later; in omap_sham_prepare_request()
900 rctx->bufcnt = 0; in omap_sham_prepare_request()
984 ctx->bufcnt = 0; in omap_sham_init()
995 ctx->bufcnt = bs; in omap_sham_init()
1052 ctx->bufcnt = 0; in omap_sham_final_req()
1127 dev_dbg(dd->dev, "digcnt: %zd, bufcnt: %zd\n", ctx->digcnt, ctx->bufcnt); in omap_sham_finish()
1202 if (ctx->bufcnt + req->nbytes <= ctx->buflen) { in omap_sham_update()
1203 scatterwalk_map_and_copy(ctx->buffer + ctx->bufcnt, req->src, in omap_sham_update()
1205 ctx->bufcnt += req->nbytes; in omap_sham_update()
1231 ctx->bufcnt - offset, req->result); in omap_sham_final_shash()
1250 if (!ctx->digcnt && ctx->bufcnt < ctx->dd->fallback_sz) in omap_sham_final()
1252 else if (ctx->bufcnt) in omap_sham_final()
1406 memcpy(out, rctx, sizeof(*rctx) + rctx->bufcnt); in omap_sham_export()
1416 memcpy(rctx, in, sizeof(*rctx) + ctx_in->bufcnt); in omap_sham_import()