Lines Matching refs:bufcnt
151 size_t bufcnt; member
639 if (ctx->bufcnt) in omap_sham_copy_sg_lists()
652 if (ctx->bufcnt) { in omap_sham_copy_sg_lists()
653 sg_set_buf(tmp, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sg_lists()
656 new_len -= ctx->bufcnt; in omap_sham_copy_sg_lists()
690 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sg_lists()
691 ctx->bufcnt = 0; in omap_sham_copy_sg_lists()
711 if (ctx->bufcnt) in omap_sham_copy_sgs()
712 memcpy(buf, ctx->dd->xmit_buf, ctx->bufcnt); in omap_sham_copy_sgs()
714 scatterwalk_map_and_copy(buf + ctx->bufcnt, sg, ctx->offset, in omap_sham_copy_sgs()
715 min(new_len, ctx->total) - ctx->bufcnt, 0); in omap_sham_copy_sgs()
721 ctx->offset += new_len - ctx->bufcnt; in omap_sham_copy_sgs()
722 ctx->bufcnt = 0; in omap_sham_copy_sgs()
738 int bufcnt = rctx->bufcnt; in omap_sham_align_sgs() local
741 if (bufcnt) { in omap_sham_align_sgs()
742 bufcnt = DIV_ROUND_UP(bufcnt, bs) * bs; in omap_sham_align_sgs()
744 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, bufcnt); in omap_sham_align_sgs()
771 if (bufcnt) { in omap_sham_align_sgs()
772 if (!IS_ALIGNED(bufcnt, bs)) { in omap_sham_align_sgs()
776 nbytes -= bufcnt; in omap_sham_align_sgs()
777 bufcnt = 0; in omap_sham_align_sgs()
834 if (rctx->bufcnt) { in omap_sham_align_sgs()
836 sg_set_buf(rctx->sgl, rctx->dd->xmit_buf, rctx->bufcnt); in omap_sham_align_sgs()
860 nbytes = rctx->bufcnt; in omap_sham_prepare_request()
868 rctx->bufcnt); in omap_sham_prepare_request()
875 if (update && req->nbytes && (!IS_ALIGNED(rctx->bufcnt, bs))) { in omap_sham_prepare_request()
876 int len = bs - rctx->bufcnt % bs; in omap_sham_prepare_request()
880 scatterwalk_map_and_copy(rctx->buffer + rctx->bufcnt, req->src, in omap_sham_prepare_request()
882 rctx->bufcnt += len; in omap_sham_prepare_request()
886 if (rctx->bufcnt) in omap_sham_prepare_request()
887 memcpy(rctx->dd->xmit_buf, rctx->buffer, rctx->bufcnt); in omap_sham_prepare_request()
903 rctx->bufcnt = hash_later; in omap_sham_prepare_request()
905 rctx->bufcnt = 0; in omap_sham_prepare_request()
989 ctx->bufcnt = 0; in omap_sham_init()
1000 ctx->bufcnt = bs; in omap_sham_init()
1057 ctx->bufcnt = 0; in omap_sham_final_req()
1128 dev_dbg(dd->dev, "digcnt: %zd, bufcnt: %zd\n", ctx->digcnt, ctx->bufcnt); in omap_sham_finish()
1203 if (ctx->bufcnt + req->nbytes <= ctx->buflen) { in omap_sham_update()
1204 scatterwalk_map_and_copy(ctx->buffer + ctx->bufcnt, req->src, in omap_sham_update()
1206 ctx->bufcnt += req->nbytes; in omap_sham_update()
1232 ctx->bufcnt - offset, req->result); in omap_sham_final_shash()
1251 if (!ctx->digcnt && ctx->bufcnt < ctx->dd->fallback_sz) in omap_sham_final()
1253 else if (ctx->bufcnt) in omap_sham_final()
1411 memcpy(out, rctx, sizeof(*rctx) + rctx->bufcnt); in omap_sham_export()
1421 memcpy(rctx, in, sizeof(*rctx) + ctx_in->bufcnt); in omap_sham_import()