Lines Matching refs:bufcnt
90 index = rctx->bufcnt & 0x3f;
92 *(rctx->buffer + rctx->bufcnt) = 0x80;
93 memset(rctx->buffer + rctx->bufcnt + 1, 0, padlen - 1);
94 memcpy(rctx->buffer + rctx->bufcnt + padlen, bits, 8);
95 rctx->bufcnt += padlen + 8;
101 index = rctx->bufcnt & 0x7f;
103 *(rctx->buffer + rctx->bufcnt) = 0x80;
104 memset(rctx->buffer + rctx->bufcnt + 1, 0, padlen - 1);
105 memcpy(rctx->buffer + rctx->bufcnt + padlen, bits, 16);
106 rctx->bufcnt += padlen + 16;
122 length = rctx->total + rctx->bufcnt;
127 if (rctx->bufcnt)
128 memcpy(hash_engine->ahash_src_addr, rctx->buffer, rctx->bufcnt);
130 if (rctx->total + rctx->bufcnt < ASPEED_CRYPTO_SRC_DMA_BUF_LEN) {
132 rctx->bufcnt, rctx->src_sg,
144 rctx->bufcnt = remain;
174 remain = (rctx->total + rctx->bufcnt) % rctx->block_size;
175 length = rctx->total + rctx->bufcnt - remain;
178 "rctx total", rctx->total, "bufcnt", rctx->bufcnt,
199 if (rctx->bufcnt != 0) {
214 len = rctx->bufcnt;
251 hash_engine->src_length = rctx->total + rctx->bufcnt - remain;
258 if (rctx->bufcnt != 0)
368 rctx->bufcnt = rctx->block_size + rctx->digsize;
393 hash_engine->src_length = rctx->bufcnt;
437 hash_engine->src_length = rctx->bufcnt;
464 if (rctx->bufcnt != 0)
475 rctx->bufcnt = rctx->total - rctx->offset;
600 if (rctx->bufcnt + rctx->total < rctx->block_size) {
601 scatterwalk_map_and_copy(rctx->buffer + rctx->bufcnt,
604 rctx->bufcnt += rctx->total;
730 rctx->bufcnt = 0;
738 rctx->bufcnt = rctx->block_size;