diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-10-18 12:24:52 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-20 10:11:09 -0400 |
commit | 8efbc2c0f6b4e52e384ecb1714511f0194c4d56a (patch) | |
tree | 58ba40fa05a341ca6bbcfe8eb6685384745a1082 /drivers/crypto | |
parent | ab270e7055e0aa9d4dc3bf419cdfdde340174978 (diff) |
crypto: marvell/cesa - fix first-fragment handling in mv_cesa_ahash_dma_last_req()
When adding the software padding, this must be done using the first/mid
fragment mode, and any subsequent operation needs to be a mid-fragment.
Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/marvell/hash.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index f4d5a7223560..4c80126de3ad 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c | |||
@@ -575,20 +575,12 @@ mv_cesa_ahash_dma_last_req(struct mv_cesa_tdma_chain *chain, | |||
575 | if (IS_ERR(op)) | 575 | if (IS_ERR(op)) |
576 | return op; | 576 | return op; |
577 | 577 | ||
578 | mv_cesa_update_op_cfg(op, CESA_SA_DESC_CFG_MID_FRAG, | ||
579 | CESA_SA_DESC_CFG_FRAG_MSK); | ||
580 | |||
581 | if (len == trailerlen) | 578 | if (len == trailerlen) |
582 | return op; | 579 | return op; |
583 | 580 | ||
584 | padoff += len; | 581 | padoff += len; |
585 | } | 582 | } |
586 | 583 | ||
587 | if (!mv_cesa_mac_op_is_first_frag(&creq->op_tmpl)) | ||
588 | mv_cesa_update_op_cfg(&creq->op_tmpl, | ||
589 | CESA_SA_DESC_CFG_MID_FRAG, | ||
590 | CESA_SA_DESC_CFG_FRAG_MSK); | ||
591 | |||
592 | ret = mv_cesa_dma_add_data_transfer(chain, | 584 | ret = mv_cesa_dma_add_data_transfer(chain, |
593 | CESA_SA_DATA_SRAM_OFFSET, | 585 | CESA_SA_DATA_SRAM_OFFSET, |
594 | ahashdreq->padding_dma + | 586 | ahashdreq->padding_dma + |