diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-26 09:55:07 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-26 09:55:07 +0400 |
commit | dd38d298385cb054263e634cf94cf18dc3ae1fc1 (patch) | |
tree | 1176d6c5a490c1480537c73555a0df3b4164aac9 /drivers/crypto/mv_cesa.c | |
parent | 9c3973966fdd3f235466195189eca362557ef098 (diff) | |
parent | 274252862f386b7868f35bf5ceaa5391a8ccfdf3 (diff) | |
download | linux-dd38d298385cb054263e634cf94cf18dc3ae1fc1.tar.xz |
Merge git://github.com/herbertx/crypto
* git://github.com/herbertx/crypto:
crypto: mv_cesa - fix hashing of chunks > 1920 bytes
Diffstat (limited to 'drivers/crypto/mv_cesa.c')
-rw-r--r-- | drivers/crypto/mv_cesa.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 5c6f56f21443..dcd8babae9eb 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c @@ -343,11 +343,13 @@ static void mv_process_hash_current(int first_block) else op.config |= CFG_MID_FRAG; - writel(req_ctx->state[0], cpg->reg + DIGEST_INITIAL_VAL_A); - writel(req_ctx->state[1], cpg->reg + DIGEST_INITIAL_VAL_B); - writel(req_ctx->state[2], cpg->reg + DIGEST_INITIAL_VAL_C); - writel(req_ctx->state[3], cpg->reg + DIGEST_INITIAL_VAL_D); - writel(req_ctx->state[4], cpg->reg + DIGEST_INITIAL_VAL_E); + if (first_block) { + writel(req_ctx->state[0], cpg->reg + DIGEST_INITIAL_VAL_A); + writel(req_ctx->state[1], cpg->reg + DIGEST_INITIAL_VAL_B); + writel(req_ctx->state[2], cpg->reg + DIGEST_INITIAL_VAL_C); + writel(req_ctx->state[3], cpg->reg + DIGEST_INITIAL_VAL_D); + writel(req_ctx->state[4], cpg->reg + DIGEST_INITIAL_VAL_E); + } } memcpy(cpg->sram + SRAM_CONFIG, &op, sizeof(struct sec_accel_config)); |