Commit a8946469 authored by Eric Biggers's avatar Eric Biggers Committed by Greg Kroah-Hartman

crypto: cavium/zip - fix collision with generic cra_driver_name

[ Upstream commit 41798036 ]

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: 640035a2 ("crypto: zip - Add ThunderX ZIP driver core")
Cc: Mahipal Challa <mahipalreddy2006@gmail.com>
Cc: Jan Glauber <jglauber@cavium.com>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cfac24f7
...@@ -351,6 +351,7 @@ static struct pci_driver zip_driver = { ...@@ -351,6 +351,7 @@ static struct pci_driver zip_driver = {
static struct crypto_alg zip_comp_deflate = { static struct crypto_alg zip_comp_deflate = {
.cra_name = "deflate", .cra_name = "deflate",
.cra_driver_name = "deflate-cavium",
.cra_flags = CRYPTO_ALG_TYPE_COMPRESS, .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
.cra_ctxsize = sizeof(struct zip_kernel_ctx), .cra_ctxsize = sizeof(struct zip_kernel_ctx),
.cra_priority = 300, .cra_priority = 300,
...@@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = { ...@@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = {
static struct crypto_alg zip_comp_lzs = { static struct crypto_alg zip_comp_lzs = {
.cra_name = "lzs", .cra_name = "lzs",
.cra_driver_name = "lzs-cavium",
.cra_flags = CRYPTO_ALG_TYPE_COMPRESS, .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
.cra_ctxsize = sizeof(struct zip_kernel_ctx), .cra_ctxsize = sizeof(struct zip_kernel_ctx),
.cra_priority = 300, .cra_priority = 300,
...@@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = { ...@@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = {
.decompress = zip_scomp_decompress, .decompress = zip_scomp_decompress,
.base = { .base = {
.cra_name = "deflate", .cra_name = "deflate",
.cra_driver_name = "deflate-scomp", .cra_driver_name = "deflate-scomp-cavium",
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
.cra_priority = 300, .cra_priority = 300,
} }
...@@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = { ...@@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = {
.decompress = zip_scomp_decompress, .decompress = zip_scomp_decompress,
.base = { .base = {
.cra_name = "lzs", .cra_name = "lzs",
.cra_driver_name = "lzs-scomp", .cra_driver_name = "lzs-scomp-cavium",
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
.cra_priority = 300, .cra_priority = 300,
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment