Lines Matching defs:length

308 		count = min(ctx->sg->length - ctx->offset, ctx->total);
314 * because the sg length is 0. In the latest case,
315 * check if there is another sg in the list, a 0 length
318 if ((ctx->sg->length == 0) && !sg_is_last(ctx->sg)) {
333 if (ctx->offset == ctx->sg->length) {
350 * 128 bits block (SHA384/SHA512) equals to the message length in bits
354 * - if message length < 56 bytes then padlen = 56 - message length
355 * - else padlen = 64 + 56 - message length
358 * - if message length < 112 bytes then padlen = 112 - message length
359 * - else padlen = 128 + 112 - message length
361 static void atmel_sha_fill_padding(struct atmel_sha_reqctx *ctx, int length)
374 size[0] += length;
375 if (size[0] < length)
562 size_t length, int final)
568 dev_dbg(dd->dev, "xmit_cpu: digcnt: 0x%llx 0x%llx, length: %zd, final: %d\n",
569 ctx->digcnt[1], ctx->digcnt[0], length, final);
574 ctx->digcnt[0] += length;
575 if (ctx->digcnt[0] < length)
581 len32 = DIV_ROUND_UP(length, sizeof(u32));
597 dev_dbg(dd->dev, "xmit_pdc: digcnt: 0x%llx 0x%llx, length: %zd, final: %d\n",
644 dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %zd, final: %d\n",
718 size_t length, int final)
731 return atmel_sha_xmit_start(dd, ctx->dma_addr, length, 0, 0, final);
762 unsigned int length, final, tail;
780 if (!sg_is_last(sg) && !IS_ALIGNED(sg->length, ctx->block_size))
784 length = min(ctx->total, sg->length);
789 tail = length & (ctx->block_size - 1);
790 length -= tail;
794 ctx->total -= length;
795 ctx->offset = length; /* offset where to start slow */
801 tail = length & (ctx->block_size - 1);
802 length -= tail;
804 ctx->offset = length; /* offset where to start slow */
809 atmel_sha_fill_padding(ctx, length);
819 if (length == 0) {
838 length, ctx->dma_addr, count, final);
850 return atmel_sha_xmit_start(dd, sg_dma_address(ctx->sg), length, 0,
860 if (ctx->sg->length == ctx->offset) {
1403 * have an unaligned length.
1405 if (len <= sg->length) {
1407 dma->last_sg_length = sg->length;
1408 sg->length = ALIGN(len, sizeof(u32));
1413 if (!IS_ALIGNED(sg->length, bs))
1416 len -= sg->length;
1434 sg->length = dma->last_sg_length;