summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/rockchip/rk3288_crypto.h
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2022-09-27 07:54:44 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-10-28 12:36:33 +0800
commit68ef8af09a1a912a5ed2cfaa4cca7606f52cef90 (patch)
treef498c8bd9e28bc531adf2afc075383f3a6201a85 /drivers/crypto/rockchip/rk3288_crypto.h
parent87e356c4966444866186f68f05832fdcc0f351a3 (diff)
downloadlinux-68ef8af09a1a912a5ed2cfaa4cca7606f52cef90.tar.gz
linux-68ef8af09a1a912a5ed2cfaa4cca7606f52cef90.tar.bz2
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.h2
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 {