diff options
author | Berne Hebark <berne.hebark@stericsson.com> | 2011-09-08 16:06:15 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 16:07:26 +0200 |
commit | 582d742fbb9f0b6ee03294a6b51198a1698da00a (patch) | |
tree | cfcad9d75807cb55827c3babba569dd2e2a3da24 | |
parent | c99d0ecd14f91a2adce28360c50db3af09015047 (diff) |
crypto: ux500: hash: Block size data fix.
- Include fix for block size data (64 byte).
ST-Ericsson ID: 352122
ST-Ericsson Linux next: Not tested, ER 320876
ST-Ericsson FOSS-OUT ID: Trivial
Ref: Commit-id: I069aba31d8620e01e74e2b1a5987a0642e74af01
Signed-off-by: Avinash A <Avinash.a@stericsson.com>
Change-Id: Idea6cc1e34d6263066188b99d97fafae0f1225aa
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30440
Reviewed-by: Avinash A <avinash.a@stericsson.com>
Tested-by: Avinash A <avinash.a@stericsson.com>
-rw-r--r-- | drivers/crypto/ux500/hash/hash_core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index ce2c9d645fa..08a89eeb601 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -1127,9 +1127,14 @@ static int ahash_final(struct ahash_request *req) } } - if (ctx->state.index) + if (ctx->state.index) { hash_messagepad(device_data, ctx->state.buffer, ctx->state.index); + } else { + HASH_SET_DCAL; + while (device_data->base->str & HASH_STR_DCAL_MASK) + cpu_relax(); + } if (ctx->config.oper_mode == HASH_OPER_MODE_HMAC && ctx->key) { unsigned int keylen = ctx->keylen; |