diff options
author | Berne Hebark <berne.hebark@stericsson.com> | 2011-09-08 16:06:15 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:04:37 +0200 |
commit | 9cec987f6f34623761e7adaad0e747b4f47e9c10 (patch) | |
tree | 8c58283e1b68f7e461e9c389c16557f8780d458e | |
parent | f4ec907012bf3f02a66c6c9dcb39bef6b413b89f (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; |