From 1080362425793f67e36dc690973e13e4a9631b4d Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 15 Sep 2012 09:06:30 -0700 Subject: sparc64: Adjust crypto priorities. Make the crypto opcode implementations have a higher priority than those provides by the ring buffer based Niagara crypto device. Also, several crypto opcode hashes were not setting the priority value at all. Signed-off-by: David S. Miller --- arch/sparc/crypto/camellia_glue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/sparc/crypto/camellia_glue.c') diff --git a/arch/sparc/crypto/camellia_glue.c b/arch/sparc/crypto/camellia_glue.c index c258cc550a6b..f45ae69d0d1a 100644 --- a/arch/sparc/crypto/camellia_glue.c +++ b/arch/sparc/crypto/camellia_glue.c @@ -14,6 +14,8 @@ #include #include +#include "opcodes.h" + #define CAMELLIA_MIN_KEY_SIZE 16 #define CAMELLIA_MAX_KEY_SIZE 32 #define CAMELLIA_BLOCK_SIZE 16 @@ -219,7 +221,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc, static struct crypto_alg algs[] = { { .cra_name = "camellia", .cra_driver_name = "camellia-sparc64", - .cra_priority = 150, + .cra_priority = SPARC_CR_OPCODE_PRIORITY, .cra_flags = CRYPTO_ALG_TYPE_CIPHER, .cra_blocksize = CAMELLIA_BLOCK_SIZE, .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), @@ -237,7 +239,7 @@ static struct crypto_alg algs[] = { { }, { .cra_name = "ecb(camellia)", .cra_driver_name = "ecb-camellia-sparc64", - .cra_priority = 150, + .cra_priority = SPARC_CR_OPCODE_PRIORITY, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = CAMELLIA_BLOCK_SIZE, .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), @@ -256,7 +258,7 @@ static struct crypto_alg algs[] = { { }, { .cra_name = "cbc(camellia)", .cra_driver_name = "cbc-camellia-sparc64", - .cra_priority = 150, + .cra_priority = SPARC_CR_OPCODE_PRIORITY, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = CAMELLIA_BLOCK_SIZE, .cra_ctxsize = sizeof(struct camellia_sparc64_ctx), -- cgit