diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2019-05-27 16:50:59 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-06-06 14:38:56 +0800 |
commit | 97a1440d12947293ff3f0eb9b649052927a55ed8 (patch) | |
tree | 228572f1c249af1f4e77c9b1fbf86d8446940d9c /drivers/crypto/inside-secure/safexcel_ring.c | |
parent | crypto: inside-secure - change returned error when a descriptor reports an error (diff) | |
download | linux-dev-97a1440d12947293ff3f0eb9b649052927a55ed8.tar.xz linux-dev-97a1440d12947293ff3f0eb9b649052927a55ed8.zip |
crypto: inside-secure - enable context reuse
The context given to the crypto engine can be reused over time. While
the driver was designed to allow this, the feature wasn't enabled in the
hardware engine. This patch enables it.
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel_ring.c')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel_ring.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_ring.c b/drivers/crypto/inside-secure/safexcel_ring.c index eb75fa684876..142bc3f5c45c 100644 --- a/drivers/crypto/inside-secure/safexcel_ring.c +++ b/drivers/crypto/inside-secure/safexcel_ring.c @@ -145,6 +145,9 @@ struct safexcel_command_desc *safexcel_add_cdesc(struct safexcel_crypto_priv *pr (lower_32_bits(context) & GENMASK(31, 2)) >> 2; cdesc->control_data.context_hi = upper_32_bits(context); + if (priv->version == EIP197B || priv->version == EIP197D) + cdesc->control_data.options |= EIP197_OPTION_RC_AUTO; + /* TODO: large xform HMAC with SHA-384/512 uses refresh = 3 */ cdesc->control_data.refresh = 2; |