From 998d2abb0cb343c419c63898a414084ac6c17100 Mon Sep 17 00:00:00 2001 From: Antoine Tenart Date: Thu, 28 Jun 2018 17:15:34 +0200 Subject: crypto: inside-secure - filter out the algorithms by engine EIP engines do not support the same set of algorithms. So far the supported engines in the Inside Secure SafeXcel driver support the same set of algorithms, but that won't be true for all engines. This patch adds an 'engines' field in the algorithm definitions so that they only are registered when using a compatible cryptographic engine. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu --- drivers/crypto/inside-secure/safexcel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/crypto/inside-secure/safexcel.h') diff --git a/drivers/crypto/inside-secure/safexcel.h b/drivers/crypto/inside-secure/safexcel.h index 6e6bdad6a6f5..b79cb36b3772 100644 --- a/drivers/crypto/inside-secure/safexcel.h +++ b/drivers/crypto/inside-secure/safexcel.h @@ -529,8 +529,8 @@ struct safexcel_work_data { }; enum safexcel_eip_version { - EIP97IES, - EIP197B, + EIP97IES = BIT(0), + EIP197B = BIT(1), }; struct safexcel_register_offsets { @@ -624,6 +624,7 @@ struct safexcel_ahash_export_state { struct safexcel_alg_template { struct safexcel_crypto_priv *priv; enum safexcel_alg_type type; + u32 engines; union { struct skcipher_alg skcipher; struct aead_alg aead; -- cgit