diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-11-13 08:03:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-16 01:14:39 -0500 |
commit | f66a29b03a2637ff052f2b8a81a5417fa44e228b (patch) | |
tree | b0cef7e1be9fe0e44c90ad95039ef5d9122ce5fc /drivers/net/tg3.c | |
parent | 24f4efd4e6c89a4093d0b8653d6669e45de45001 (diff) |
tg3: Move TG3_FLG2_PROTECTED_NVRAM to tg3_flags3
We need room for another TSO flag and it would be most efficient if it
resided in tg3_flags2. This patch moves the TG3_FLG2_PROTECTED_NVRAM
to tg3_flags3 to make room.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 072e3ee4c93b..f74d80d5515d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -2249,7 +2249,7 @@ static void tg3_nvram_unlock(struct tg3 *tp) | |||
2249 | static void tg3_enable_nvram_access(struct tg3 *tp) | 2249 | static void tg3_enable_nvram_access(struct tg3 *tp) |
2250 | { | 2250 | { |
2251 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 2251 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
2252 | !(tp->tg3_flags2 & TG3_FLG2_PROTECTED_NVRAM)) { | 2252 | !(tp->tg3_flags3 & TG3_FLG3_PROTECTED_NVRAM)) { |
2253 | u32 nvaccess = tr32(NVRAM_ACCESS); | 2253 | u32 nvaccess = tr32(NVRAM_ACCESS); |
2254 | 2254 | ||
2255 | tw32(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE); | 2255 | tw32(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE); |
@@ -2260,7 +2260,7 @@ static void tg3_enable_nvram_access(struct tg3 *tp) | |||
2260 | static void tg3_disable_nvram_access(struct tg3 *tp) | 2260 | static void tg3_disable_nvram_access(struct tg3 *tp) |
2261 | { | 2261 | { |
2262 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 2262 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
2263 | !(tp->tg3_flags2 & TG3_FLG2_PROTECTED_NVRAM)) { | 2263 | !(tp->tg3_flags3 & TG3_FLG3_PROTECTED_NVRAM)) { |
2264 | u32 nvaccess = tr32(NVRAM_ACCESS); | 2264 | u32 nvaccess = tr32(NVRAM_ACCESS); |
2265 | 2265 | ||
2266 | tw32(NVRAM_ACCESS, nvaccess & ~ACCESS_ENABLE); | 2266 | tw32(NVRAM_ACCESS, nvaccess & ~ACCESS_ENABLE); |
@@ -10970,7 +10970,7 @@ static void __devinit tg3_get_5752_nvram_info(struct tg3 *tp) | |||
10970 | 10970 | ||
10971 | /* NVRAM protection for TPM */ | 10971 | /* NVRAM protection for TPM */ |
10972 | if (nvcfg1 & (1 << 27)) | 10972 | if (nvcfg1 & (1 << 27)) |
10973 | tp->tg3_flags2 |= TG3_FLG2_PROTECTED_NVRAM; | 10973 | tp->tg3_flags3 |= TG3_FLG3_PROTECTED_NVRAM; |
10974 | 10974 | ||
10975 | switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) { | 10975 | switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) { |
10976 | case FLASH_5752VENDOR_ATMEL_EEPROM_64KHZ: | 10976 | case FLASH_5752VENDOR_ATMEL_EEPROM_64KHZ: |
@@ -11011,7 +11011,7 @@ static void __devinit tg3_get_5755_nvram_info(struct tg3 *tp) | |||
11011 | 11011 | ||
11012 | /* NVRAM protection for TPM */ | 11012 | /* NVRAM protection for TPM */ |
11013 | if (nvcfg1 & (1 << 27)) { | 11013 | if (nvcfg1 & (1 << 27)) { |
11014 | tp->tg3_flags2 |= TG3_FLG2_PROTECTED_NVRAM; | 11014 | tp->tg3_flags3 |= TG3_FLG3_PROTECTED_NVRAM; |
11015 | protect = 1; | 11015 | protect = 1; |
11016 | } | 11016 | } |
11017 | 11017 | ||
@@ -11105,7 +11105,7 @@ static void __devinit tg3_get_5761_nvram_info(struct tg3 *tp) | |||
11105 | 11105 | ||
11106 | /* NVRAM protection for TPM */ | 11106 | /* NVRAM protection for TPM */ |
11107 | if (nvcfg1 & (1 << 27)) { | 11107 | if (nvcfg1 & (1 << 27)) { |
11108 | tp->tg3_flags2 |= TG3_FLG2_PROTECTED_NVRAM; | 11108 | tp->tg3_flags3 |= TG3_FLG3_PROTECTED_NVRAM; |
11109 | protect = 1; | 11109 | protect = 1; |
11110 | } | 11110 | } |
11111 | 11111 | ||
@@ -11607,7 +11607,7 @@ static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf) | |||
11607 | 11607 | ||
11608 | tg3_enable_nvram_access(tp); | 11608 | tg3_enable_nvram_access(tp); |
11609 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 11609 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
11610 | !(tp->tg3_flags2 & TG3_FLG2_PROTECTED_NVRAM)) | 11610 | !(tp->tg3_flags3 & TG3_FLG3_PROTECTED_NVRAM)) |
11611 | tw32(NVRAM_WRITE1, 0x406); | 11611 | tw32(NVRAM_WRITE1, 0x406); |
11612 | 11612 | ||
11613 | grc_mode = tr32(GRC_MODE); | 11613 | grc_mode = tr32(GRC_MODE); |