Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.20-r6/0112-2.6.20.12-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1175 - (show annotations) (download)
Thu Oct 14 12:15:46 2010 UTC (13 years, 6 months ago) by niro
File size: 1476 byte(s)
-2.6.20-alx-r6 new magellan 0.5.2 kernel
1 diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
2 index 43a6839..9dbb218 100644
3 --- a/drivers/crypto/geode-aes.c
4 +++ b/drivers/crypto/geode-aes.c
5 @@ -104,10 +104,15 @@ geode_aes_crypt(struct geode_aes_op *op)
6 u32 flags = 0;
7 int iflags;
8
9 - if (op->len == 0 || op->src == op->dst)
10 + if (op->len == 0)
11 return 0;
12
13 - if (op->flags & AES_FLAGS_COHERENT)
14 + /* If the source and destination is the same, then
15 + * we need to turn on the coherent flags, otherwise
16 + * we don't need to worry
17 + */
18 +
19 + if (op->src == op->dst)
20 flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
21
22 if (op->dir == AES_DIR_ENCRYPT)
23 @@ -122,7 +127,7 @@ geode_aes_crypt(struct geode_aes_op *op)
24 _writefield(AES_WRITEIV0_REG, op->iv);
25 }
26
27 - if (op->flags & AES_FLAGS_USRKEY) {
28 + if (!(op->flags & AES_FLAGS_HIDDENKEY)) {
29 flags |= AES_CTRL_WRKEY;
30 _writefield(AES_WRITEKEY0_REG, op->key);
31 }
32 @@ -291,6 +296,7 @@ static struct crypto_alg geode_cbc_alg = {
33 .setkey = geode_setkey,
34 .encrypt = geode_cbc_encrypt,
35 .decrypt = geode_cbc_decrypt,
36 + .ivsize = AES_IV_LENGTH,
37 }
38 }
39 };
40 diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h
41 index 8003a36..f479686 100644
42 --- a/drivers/crypto/geode-aes.h
43 +++ b/drivers/crypto/geode-aes.h
44 @@ -20,8 +20,7 @@
45 #define AES_DIR_DECRYPT 0
46 #define AES_DIR_ENCRYPT 1
47
48 -#define AES_FLAGS_USRKEY (1 << 0)
49 -#define AES_FLAGS_COHERENT (1 << 1)
50 +#define AES_FLAGS_HIDDENKEY (1 << 0)
51
52 struct geode_aes_op {
53