Lines Matching refs:bufcnt

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