diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2022-09-27 09:54:44 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-10-28 06:36:33 +0200 |
commit | 68ef8af09a1a912a5ed2cfaa4cca7606f52cef90 (patch) | |
tree | f498c8bd9e28bc531adf2afc075383f3a6201a85 /drivers/crypto/rockchip/rk3288_crypto.h | |
parent | crypto: rockchip - do not store mode globally (diff) | |
download | linux-68ef8af09a1a912a5ed2cfaa4cca7606f52cef90.tar.xz linux-68ef8af09a1a912a5ed2cfaa4cca7606f52cef90.zip |
crypto: rockchip - add fallback for cipher
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>
Diffstat (limited to 'drivers/crypto/rockchip/rk3288_crypto.h')
-rw-r--r-- | drivers/crypto/rockchip/rk3288_crypto.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto.h b/drivers/crypto/rockchip/rk3288_crypto.h index c919d9a43a08..8b1e15d8ddc6 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.h +++ b/drivers/crypto/rockchip/rk3288_crypto.h @@ -246,10 +246,12 @@ struct rk_cipher_ctx { struct rk_crypto_info *dev; unsigned int keylen; u8 iv[AES_BLOCK_SIZE]; + struct crypto_skcipher *fallback_tfm; }; struct rk_cipher_rctx { u32 mode; + struct skcipher_request fallback_req; // keep at the end }; enum alg_type { |