diff options
author | Con Kolivas <kernel@kolivas.org> | 2016-12-12 10:56:17 +1100 |
---|---|---|
committer | Con Kolivas <kernel@kolivas.org> | 2016-12-12 10:56:17 +1100 |
commit | c3e1d5cbf048128fa788513fbc5fa3036c85fcb0 (patch) | |
tree | 4b2b38cc960963abc48b2e30c6e2415ee383c98d /drivers/crypto/marvell/hash.c | |
parent | e4d2e01f84338d948be51202038842fe3e0f6ce9 (diff) | |
parent | 69973b830859bc6529a7a0468ba0d80ee5117826 (diff) |
Merge tag 'v4.9' into 4.9-muqss4.9-muqss-150
Linux 4.9
Diffstat (limited to 'drivers/crypto/marvell/hash.c')
-rw-r--r-- | drivers/crypto/marvell/hash.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 9f284682c091..77712b375b84 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c @@ -168,12 +168,11 @@ static void mv_cesa_ahash_std_step(struct ahash_request *req) mv_cesa_adjust_op(engine, &creq->op_tmpl); memcpy_toio(engine->sram, &creq->op_tmpl, sizeof(creq->op_tmpl)); - digsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(req)); - for (i = 0; i < digsize / 4; i++) - writel_relaxed(creq->state[i], engine->regs + CESA_IVDIG(i)); - - mv_cesa_adjust_op(engine, &creq->op_tmpl); - memcpy_toio(engine->sram, &creq->op_tmpl, sizeof(creq->op_tmpl)); + if (!sreq->offset) { + digsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(req)); + for (i = 0; i < digsize / 4; i++) + writel_relaxed(creq->state[i], engine->regs + CESA_IVDIG(i)); + } if (creq->cache_ptr) memcpy_toio(engine->sram + CESA_SA_DATA_SRAM_OFFSET, |