crypto: rockchip - add fallback for cipher
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 27 Sep 2022 07:54:44 +0000 (07:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:22 +0000 (13:14 +0100)
commit34fe54af3cf5b1f03aab2c29fcc74493a9c9c541
treeb6da15b730f59567653e72cf71ec38a140d376bb
parent314217591ec6c01ed5dc34577e59e6896787fde3
crypto: rockchip - add fallback for cipher

[ Upstream commit 68ef8af09a1a912a5ed2cfaa4cca7606f52cef90 ]

The hardware does not handle 0 size length request, let's add a
fallback.
Furthermore fallback will be used for all unaligned case the hardware
cannot handle.

Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API")
Reviewed-by: John Keeping <john@metanate.com>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/Kconfig
drivers/crypto/rockchip/rk3288_crypto.h
drivers/crypto/rockchip/rk3288_crypto_skcipher.c