From 96d4c4740144661a5f21611d9d754a538f6d64cd Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 5 May 2011 15:29:04 +0200 Subject: [PATCH] --- yaml --- r: 247799 b: refs/heads/master c: 8652348754a1f538daa1eab248e5c9c4c3600204 h: refs/heads/master i: 247797: aeb843970b57353279818839a3988dd18ee9ac4a 247795: 506ea302462ccf36d1340c20fa20a28a327ecfea 247791: 975fb4242b16cf9469e27404a13ee0760e66d742 v: v3 --- [refs] | 2 +- trunk/drivers/crypto/mv_cesa.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 6c0e37e1b68f..7820e019e6e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc8d35057ce7ae2f88cc65be0f839316c4641332 +refs/heads/master: 8652348754a1f538daa1eab248e5c9c4c3600204 diff --git a/trunk/drivers/crypto/mv_cesa.c b/trunk/drivers/crypto/mv_cesa.c index c1925c2a88b0..a2d9e394f80f 100644 --- a/trunk/drivers/crypto/mv_cesa.c +++ b/trunk/drivers/crypto/mv_cesa.c @@ -342,6 +342,12 @@ static void mv_process_hash_current(int first_block) op.config |= CFG_LAST_FRAG; 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); } memcpy(cpg->sram + SRAM_CONFIG, &op, sizeof(struct sec_accel_config)); @@ -525,14 +531,6 @@ static void mv_start_new_hash_req(struct ahash_request *req) p->crypt_len = ctx->extra_bytes; } - if (unlikely(!ctx->first_hash)) { - writel(ctx->state[0], cpg->reg + DIGEST_INITIAL_VAL_A); - writel(ctx->state[1], cpg->reg + DIGEST_INITIAL_VAL_B); - writel(ctx->state[2], cpg->reg + DIGEST_INITIAL_VAL_C); - writel(ctx->state[3], cpg->reg + DIGEST_INITIAL_VAL_D); - writel(ctx->state[4], cpg->reg + DIGEST_INITIAL_VAL_E); - } - ctx->extra_bytes = hw_bytes % SHA1_BLOCK_SIZE; if (ctx->extra_bytes != 0 && (!ctx->last_chunk || ctx->count > MAX_HW_HASH_SIZE))