diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2018-12-21 13:47:46 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-10 14:37:31 +0100 |
commit | 2dd3fde41bf3dc68e38de23da87e72a07719b708 (patch) | |
tree | 15a68d8de0dfa57a3db654230c26a4683e41d752 /drivers/crypto/caam/caamalg.c | |
parent | crypto: caam - fix zero-length buffer DMA mapping (diff) | |
download | linux-2dd3fde41bf3dc68e38de23da87e72a07719b708.tar.xz linux-2dd3fde41bf3dc68e38de23da87e72a07719b708.zip |
crypto: caam - fix SHA support detection
The addition of Chacha20 + Poly1305 authenc support inadvertently broke
detection of algorithms supported by MDHA (Message Digest Hardware
Accelerator), fix it.
Fixes: d6bbd4eea243 ("crypto: caam/jr - add support for Chacha20 + Poly1305")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamalg.c')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 92e593e2069a..80ae69f906fb 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -3476,7 +3476,7 @@ static int __init caam_algapi_init(void) * Skip algorithms requiring message digests * if MD or MD size is not supported by device. */ - if ((c2_alg_sel & ~OP_ALG_ALGSEL_SUBMASK) == 0x40 && + if (is_mdha(c2_alg_sel) && (!md_inst || t_alg->aead.maxauthsize > md_limit)) continue; |