From a6c9a52d60c342ad6267f27edd0f5a7794a7b6ac Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 5 May 2011 15:29:05 +0200 Subject: [PATCH] --- yaml --- r: 247800 b: refs/heads/master c: 7759995c75ae0cbd4c861582908449f6b6208e7a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/crypto/mv_cesa.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 7820e019e6e8..7ef906502182 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8652348754a1f538daa1eab248e5c9c4c3600204 +refs/heads/master: 7759995c75ae0cbd4c861582908449f6b6208e7a diff --git a/trunk/drivers/crypto/mv_cesa.c b/trunk/drivers/crypto/mv_cesa.c index a2d9e394f80f..d704ed0e7d3d 100644 --- a/trunk/drivers/crypto/mv_cesa.c +++ b/trunk/drivers/crypto/mv_cesa.c @@ -525,12 +525,6 @@ static void mv_start_new_hash_req(struct ahash_request *req) hw_bytes = req->nbytes + ctx->extra_bytes; old_extra_bytes = ctx->extra_bytes; - if (unlikely(ctx->extra_bytes)) { - memcpy(cpg->sram + SRAM_DATA_IN_START, ctx->buffer, - ctx->extra_bytes); - p->crypt_len = ctx->extra_bytes; - } - ctx->extra_bytes = hw_bytes % SHA1_BLOCK_SIZE; if (ctx->extra_bytes != 0 && (!ctx->last_chunk || ctx->count > MAX_HW_HASH_SIZE)) @@ -546,6 +540,12 @@ static void mv_start_new_hash_req(struct ahash_request *req) p->complete = mv_hash_algo_completion; p->process = mv_process_hash_current; + if (unlikely(old_extra_bytes)) { + memcpy(cpg->sram + SRAM_DATA_IN_START, ctx->buffer, + old_extra_bytes); + p->crypt_len = old_extra_bytes; + } + mv_process_hash_current(1); } else { copy_src_to_buf(p, ctx->buffer + old_extra_bytes,