Hi Herbert,
This patch set contains a few caam driver updates.
The fixes are minor and thus ok to go through the cryptodev tree.
Dan Douglass (1):
crypto: caam/jr - remove incorrect reference to caam_jr_register()
Franck LENORMAND (1):
crypto: caam - remove deadcode on 32-bit platforms
Horia Geantă (5):
crypto: caam/qi2 - fix error reporting for caam_hash_alloc
crypto: caam/qi2 - create ahash shared descriptors only once
crypto: caam - silence .setkey in case of bad key length
crypto: caam - add more RNG hw error codes
crypto: caam/qi2 - add module alias
drivers/crypto/caam/caamalg.c | 2 +-
drivers/crypto/caam/caamalg_qi.c | 2 +-
drivers/crypto/caam/caamalg_qi2.c | 11 ++++++++---
drivers/crypto/caam/error.c | 3 +++
drivers/crypto/caam/jr.c | 3 +--
drivers/crypto/caam/regs.h | 11 ++++++++---
6 files changed, 22 insertions(+), 10 deletions(-)
--
2.17.1
For keyed hash algorithms, shared descriptors are currently generated
twice:
-at tfm initialization time, in cra_init() callback
-in setkey() callback
Since it's mandatory to call setkey() for keyed algorithms, drop the
generation in cra_init().
This is similar to the change in caamhash (caam/jr top-level library)
commit 9a2537d0ebc9 ("crypto: caam - create ahash shared descriptors only once")
Signed-off-by: Horia Geantă <[email protected]>
---
drivers/crypto/caam/caamalg_qi2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 811d34eee4f2..1e901344db67 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -4500,7 +4500,11 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm)
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
sizeof(struct caam_hash_state));
- return ahash_set_sh_desc(ahash);
+ /*
+ * For keyed hash algorithms shared descriptors
+ * will be created later in setkey() callback
+ */
+ return alg->setkey ? 0 : ahash_set_sh_desc(ahash);
}
static void caam_hash_cra_exit(struct crypto_tfm *tfm)
--
2.17.1
Add a module alias, to enable udev-based module autoloading:
$ modinfo -F alias drivers/crypto/caam/dpaa2_caam.ko
fsl-mc:v00001957ddpseci
Signed-off-by: Horia Geantă <[email protected]>
---
drivers/crypto/caam/caamalg_qi2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 700e1d50211f..66ae1d581168 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -5405,6 +5405,7 @@ static const struct fsl_mc_device_id dpaa2_caam_match_id_table[] = {
},
{ .vendor = 0x0 }
};
+MODULE_DEVICE_TABLE(fslmc, dpaa2_caam_match_id_table);
static struct fsl_mc_driver dpaa2_caam_driver = {
.driver = {
--
2.17.1
On Wed, Jul 22, 2020 at 03:14:51PM +0300, Horia Geantă wrote:
> Hi Herbert,
>
> This patch set contains a few caam driver updates.
> The fixes are minor and thus ok to go through the cryptodev tree.
>
> Dan Douglass (1):
> crypto: caam/jr - remove incorrect reference to caam_jr_register()
>
> Franck LENORMAND (1):
> crypto: caam - remove deadcode on 32-bit platforms
>
> Horia Geantă (5):
> crypto: caam/qi2 - fix error reporting for caam_hash_alloc
> crypto: caam/qi2 - create ahash shared descriptors only once
> crypto: caam - silence .setkey in case of bad key length
> crypto: caam - add more RNG hw error codes
> crypto: caam/qi2 - add module alias
>
> drivers/crypto/caam/caamalg.c | 2 +-
> drivers/crypto/caam/caamalg_qi.c | 2 +-
> drivers/crypto/caam/caamalg_qi2.c | 11 ++++++++---
> drivers/crypto/caam/error.c | 3 +++
> drivers/crypto/caam/jr.c | 3 +--
> drivers/crypto/caam/regs.h | 11 ++++++++---
> 6 files changed, 22 insertions(+), 10 deletions(-)
All applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt