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