]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: marvell/cesa - Do not chain submitted requests
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 May 2025 05:22:16 +0000 (13:22 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 21 May 2025 05:27:46 +0000 (13:27 +0800)
commit0413bcf0fc460a68a2a7a8354aee833293d7d693
treeff6a15b34e70299cb98738aab68c2c4857951c79
parentbc8169003b41e89fe7052e408cf9fdbecb4017fe
crypto: marvell/cesa - Do not chain submitted requests

This driver tries to chain requests together before submitting them
to hardware in order to reduce completion interrupts.

However, it even extends chains that have already been submitted
to hardware.  This is dangerous because there is no way of knowing
whether the hardware has already read the DMA memory in question
or not.

Fix this by splitting the chain list into two.  One for submitted
requests and one for requests that have not yet been submitted.
Only extend the latter.

Reported-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining crypto requests in TDMA mode")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cesa/cesa.c
drivers/crypto/marvell/cesa/cesa.h
drivers/crypto/marvell/cesa/tdma.c