Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.21-r14/0102-2.6.21.3-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 447 - (show annotations) (download)
Tue Jan 22 17:55:52 2008 UTC (16 years, 3 months ago) by niro
File size: 1486 byte(s)
-2.6.21-alx-r14 - fixed some natsemi errors on wys terminals

1 diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
2 index 6d3840e..6a86958 100644
3 --- a/drivers/crypto/geode-aes.c
4 +++ b/drivers/crypto/geode-aes.c
5 @@ -102,10 +102,15 @@ geode_aes_crypt(struct geode_aes_op *op)
6 u32 flags = 0;
7 unsigned long 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 @@ -120,7 +125,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 @@ -289,6 +294,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