crypto: marvell - Don't break chain for computable last ahash requests
authorRomain Perier <romain.perier@free-electrons.com>
Wed, 5 Oct 2016 07:56:33 +0000 (09:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 03:03:40 +0000 (11:03 +0800)
commitf34dad1721642989336283c9e6c3b8f6b23fa67c
tree964d554027cf46c7d2602a7970e82faccd264e24
parent0c99620f0ac13a51f2f78cf62e6b551a09f8b1f1
crypto: marvell - Don't break chain for computable last ahash requests

Currently, the driver breaks chain for all kind of hash requests in order to
don't override intermediate states of partial ahash updates. However, some final
ahash requests can be directly processed by the engine, and so without
intermediate state. This is typically the case for most for the HMAC requests
processed via IPSec.

This commits adds a TDMA descriptor to copy context for these of requests
into the "op" dma pool, then it allow to chain these requests at the DMA level.
The 'complete' operation is also updated to retrieve the MAC digest from the
right location.

Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/hash.c