]> err.no Git - linux-2.6/commitdiff
[CRYPTO] s390: Added missing driver name and priority
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 21 Aug 2006 11:18:50 +0000 (21:18 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 21 Sep 2006 01:41:50 +0000 (11:41 +1000)
Accelerated versions of crypto algorithms must carry a distinct driver name
and priority in order to distinguish themselves from their generic counter-
part.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/s390/crypto/aes_s390.c
arch/s390/crypto/crypt_s390.h
arch/s390/crypto/des_s390.c
arch/s390/crypto/sha1_s390.c
arch/s390/crypto/sha256_s390.c

index c7c43c9de0d90c0722a3dfcb02f6bf16e68e5785..220300e760d8a85a52b9003524c24cf48f636794 100644 (file)
@@ -222,6 +222,8 @@ static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
 
 static struct crypto_alg aes_alg = {
        .cra_name               =       "aes",
+       .cra_driver_name        =       "aes-s390",
+       .cra_priority           =       CRYPT_S390_PRIORITY,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       AES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct s390_aes_ctx),
index d1c259a7fe33a8763901db0f68d460bf3e61dbff..d1d330797f75ded308f5b8bc94c2b3b0f39587ee 100644 (file)
@@ -20,6 +20,8 @@
 #define CRYPT_S390_OP_MASK 0xFF00
 #define CRYPT_S390_FUNC_MASK 0x00FF
 
+#define CRYPT_S390_PRIORITY 300
+
 /* s930 cryptographic operations */
 enum crypt_s390_operations {
        CRYPT_S390_KM   = 0x0100,
index 170757b3451daaaf9deee8d218d1b0b38912ef1e..3fd5d37d5e05bc4a4866431da42ab33b0393e758 100644 (file)
@@ -135,6 +135,8 @@ static unsigned int des_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
 
 static struct crypto_alg des_alg = {
        .cra_name               =       "des",
+       .cra_driver_name        =       "des-s390",
+       .cra_priority           =       CRYPT_S390_PRIORITY,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       DES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct crypt_s390_des_ctx),
@@ -271,6 +273,8 @@ static unsigned int des3_128_decrypt_cbc(const struct cipher_desc *desc,
 
 static struct crypto_alg des3_128_alg = {
        .cra_name               =       "des3_ede128",
+       .cra_driver_name        =       "des3_ede128-s390",
+       .cra_priority           =       CRYPT_S390_PRIORITY,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       DES3_128_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct crypt_s390_des3_128_ctx),
@@ -411,6 +415,8 @@ static unsigned int des3_192_decrypt_cbc(const struct cipher_desc *desc,
 
 static struct crypto_alg des3_192_alg = {
        .cra_name               =       "des3_ede",
+       .cra_driver_name        =       "des3_ede-s390",
+       .cra_priority           =       CRYPT_S390_PRIORITY,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       DES3_192_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct crypt_s390_des3_192_ctx),
index 9d34a35b1aa56518cf074831a204c8473c362147..49ca8690ee39b7d53e116274b74bd883698a2e01 100644 (file)
@@ -126,6 +126,8 @@ static void sha1_final(struct crypto_tfm *tfm, u8 *out)
 
 static struct crypto_alg alg = {
        .cra_name       =       "sha1",
+       .cra_driver_name =      "sha1-s390",
+       .cra_priority   =       CRYPT_S390_PRIORITY,
        .cra_flags      =       CRYPTO_ALG_TYPE_DIGEST,
        .cra_blocksize  =       SHA1_BLOCK_SIZE,
        .cra_ctxsize    =       sizeof(struct crypt_s390_sha1_ctx),
index f573df30f31d28429b2f69ea819aec6a5775a8fa..8e4e67503fe7f8df35fa8817109d945763001084 100644 (file)
@@ -127,6 +127,8 @@ static void sha256_final(struct crypto_tfm *tfm, u8 *out)
 
 static struct crypto_alg alg = {
        .cra_name       =       "sha256",
+       .cra_driver_name =      "sha256-s390",
+       .cra_priority   =       CRYPT_S390_PRIORITY,
        .cra_flags      =       CRYPTO_ALG_TYPE_DIGEST,
        .cra_blocksize  =       SHA256_BLOCK_SIZE,
        .cra_ctxsize    =       sizeof(struct s390_sha256_ctx),