]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
crypto: cavium/zip - fix collision with generic cra_driver_name
authorEric Biggers <ebiggers@google.com>
Sat, 23 Feb 2019 08:23:23 +0000 (00:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:31:29 +0000 (22:31 +0200)
[ Upstream commit 41798036430015ad45137db2d4c213cd77fd0251 ]

The cavium/zip implementation of the deflate compression algorithm is
incorrectly being registered under the generic driver name, which
prevents the generic implementation from being registered with the
crypto API when CONFIG_CRYPTO_DEV_CAVIUM_ZIP=y.  Similarly the lzs
algorithm (which does not currently have a generic implementation...)
is incorrectly being registered as lzs-generic.

Fix the naming collision by adding a suffix "-cavium" to the
cra_driver_name of the cavium/zip algorithms.

Fixes: 640035a2dc55 ("crypto: zip - Add ThunderX ZIP driver core")
Cc: Mahipal Challa <mahipalreddy2006@gmail.com>
Cc: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/cavium/zip/zip_main.c

index 1cd8aa48818580995dd60b3a683b7ab0db6d859d..a6425a7afa7ba4505b9fa79c35556c6ef7eb7472 100644 (file)
@@ -351,6 +351,7 @@ static struct pci_driver zip_driver = {
 
 static struct crypto_alg zip_comp_deflate = {
        .cra_name               = "deflate",
+       .cra_driver_name        = "deflate-cavium",
        .cra_flags              = CRYPTO_ALG_TYPE_COMPRESS,
        .cra_ctxsize            = sizeof(struct zip_kernel_ctx),
        .cra_priority           = 300,
@@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = {
 
 static struct crypto_alg zip_comp_lzs = {
        .cra_name               = "lzs",
+       .cra_driver_name        = "lzs-cavium",
        .cra_flags              = CRYPTO_ALG_TYPE_COMPRESS,
        .cra_ctxsize            = sizeof(struct zip_kernel_ctx),
        .cra_priority           = 300,
@@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = {
        .decompress             = zip_scomp_decompress,
        .base                   = {
                .cra_name               = "deflate",
-               .cra_driver_name        = "deflate-scomp",
+               .cra_driver_name        = "deflate-scomp-cavium",
                .cra_module             = THIS_MODULE,
                .cra_priority           = 300,
        }
@@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = {
        .decompress             = zip_scomp_decompress,
        .base                   = {
                .cra_name               = "lzs",
-               .cra_driver_name        = "lzs-scomp",
+               .cra_driver_name        = "lzs-scomp-cavium",
                .cra_module             = THIS_MODULE,
                .cra_priority           = 300,
        }