From 9cec987f6f34623761e7adaad0e747b4f47e9c10 Mon Sep 17 00:00:00 2001 From: Berne Hebark Date: Thu, 8 Sep 2011 16:06:15 +0530 Subject: 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 Change-Id: Idea6cc1e34d6263066188b99d97fafae0f1225aa Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30440 Reviewed-by: Avinash A Tested-by: Avinash A --- drivers/crypto/ux500/hash/hash_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3