• Home
  • Raw
  • Download

Lines Matching refs:bufcnt

87 	size_t	bufcnt;  member
162 while ((ctx->bufcnt < ctx->buflen) && ctx->total) { in atmel_sha_append_sg()
164 count = min(count, ctx->buflen - ctx->bufcnt); in atmel_sha_append_sg()
181 scatterwalk_map_and_copy(ctx->buffer + ctx->bufcnt, ctx->sg, in atmel_sha_append_sg()
184 ctx->bufcnt += count; in atmel_sha_append_sg()
225 size[0] += ctx->bufcnt; in atmel_sha_fill_padding()
226 if (size[0] < ctx->bufcnt) in atmel_sha_fill_padding()
237 index = ctx->bufcnt & 0x7f; in atmel_sha_fill_padding()
239 *(ctx->buffer + ctx->bufcnt) = 0x80; in atmel_sha_fill_padding()
240 memset(ctx->buffer + ctx->bufcnt + 1, 0, padlen-1); in atmel_sha_fill_padding()
241 memcpy(ctx->buffer + ctx->bufcnt + padlen, bits, 16); in atmel_sha_fill_padding()
242 ctx->bufcnt += padlen + 16; in atmel_sha_fill_padding()
245 index = ctx->bufcnt & 0x3f; in atmel_sha_fill_padding()
247 *(ctx->buffer + ctx->bufcnt) = 0x80; in atmel_sha_fill_padding()
248 memset(ctx->buffer + ctx->bufcnt + 1, 0, padlen-1); in atmel_sha_fill_padding()
249 memcpy(ctx->buffer + ctx->bufcnt + padlen, &bits[1], 8); in atmel_sha_fill_padding()
250 ctx->bufcnt += padlen + 8; in atmel_sha_fill_padding()
309 ctx->bufcnt = 0; in atmel_sha_init()
494 int bufcnt; in atmel_sha_update_cpu() local
498 bufcnt = ctx->bufcnt; in atmel_sha_update_cpu()
499 ctx->bufcnt = 0; in atmel_sha_update_cpu()
501 return atmel_sha_xmit_cpu(dd, ctx->buffer, bufcnt, 1); in atmel_sha_update_cpu()
533 ctx->bufcnt, ctx->digcnt[1], ctx->digcnt[0], final); in atmel_sha_update_dma_slow()
538 if (final || (ctx->bufcnt == ctx->buflen)) { in atmel_sha_update_dma_slow()
539 count = ctx->bufcnt; in atmel_sha_update_dma_slow()
540 ctx->bufcnt = 0; in atmel_sha_update_dma_slow()
557 if (ctx->bufcnt || ctx->offset) in atmel_sha_update_dma_start()
561 ctx->digcnt[1], ctx->digcnt[0], ctx->bufcnt, ctx->total); in atmel_sha_update_dma_start()
609 count = ctx->bufcnt; in atmel_sha_update_dma_start()
610 ctx->bufcnt = 0; in atmel_sha_update_dma_start()
623 count = ctx->bufcnt; in atmel_sha_update_dma_start()
624 ctx->bufcnt = 0; in atmel_sha_update_dma_start()
693 if (ctx->bufcnt >= ATMEL_SHA_DMA_THRESHOLD) { in atmel_sha_final_req()
695 count = ctx->bufcnt; in atmel_sha_final_req()
696 ctx->bufcnt = 0; in atmel_sha_final_req()
702 count = ctx->bufcnt; in atmel_sha_final_req()
703 ctx->bufcnt = 0; in atmel_sha_final_req()
764 ctx->digcnt[0], ctx->bufcnt); in atmel_sha_finish()
913 if (ctx->bufcnt + ctx->total < ATMEL_SHA_DMA_THRESHOLD) in atmel_sha_update()
916 } else if (ctx->bufcnt + ctx->total < ctx->buflen) { in atmel_sha_update()
936 if (ctx->bufcnt) { in atmel_sha_final()