diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-12-08 02:28:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 23:10:11 -0500 |
commit | 0781895067444db98050a1537bafbc7a0235ec9f (patch) | |
tree | e308e319eab01bd958f41d5ae997cb871d6fef14 | |
parent | 93a23f48df9c0111283302acd2a4ed2ef1d86453 (diff) |
e1000e: replace incorrect use of GG82563_REG macro
The GG82563_REG() macro should not be used to determine the offset provided
to the e1000e_[read|write]_kmrn_reg() functions since the first argument to
the macro is already implied and gets masked off anyway in the functions.
The resultant register reads/writes with this patch are functionally the
same as before.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/e1000e/hw.h | 2 | ||||
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h index a7d08dae79c4..5ed17889e64d 100644 --- a/drivers/net/e1000e/hw.h +++ b/drivers/net/e1000e/hw.h | |||
@@ -302,6 +302,8 @@ enum e1e_registers { | |||
302 | #define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16 | 302 | #define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16 |
303 | #define E1000_KMRNCTRLSTA_REN 0x00200000 | 303 | #define E1000_KMRNCTRLSTA_REN 0x00200000 |
304 | #define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */ | 304 | #define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */ |
305 | #define E1000_KMRNCTRLSTA_TIMEOUTS 0x4 /* Kumeran Timeouts */ | ||
306 | #define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9 /* Kumeran InBand Parameters */ | ||
305 | #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */ | 307 | #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */ |
306 | #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7 | 308 | #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7 |
307 | #define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E | 309 | #define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 7b33be98a2ca..9b09246af064 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -2755,14 +2755,16 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw) | |||
2755 | * and increase the max iterations when polling the phy; | 2755 | * and increase the max iterations when polling the phy; |
2756 | * this fixes erroneous timeouts at 10Mbps. | 2756 | * this fixes erroneous timeouts at 10Mbps. |
2757 | */ | 2757 | */ |
2758 | ret_val = e1000e_write_kmrn_reg(hw, GG82563_REG(0x34, 4), 0xFFFF); | 2758 | ret_val = e1000e_write_kmrn_reg(hw, E1000_KMRNCTRLSTA_TIMEOUTS, 0xFFFF); |
2759 | if (ret_val) | 2759 | if (ret_val) |
2760 | return ret_val; | 2760 | return ret_val; |
2761 | ret_val = e1000e_read_kmrn_reg(hw, GG82563_REG(0x34, 9), ®_data); | 2761 | ret_val = e1000e_read_kmrn_reg(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
2762 | ®_data); | ||
2762 | if (ret_val) | 2763 | if (ret_val) |
2763 | return ret_val; | 2764 | return ret_val; |
2764 | reg_data |= 0x3F; | 2765 | reg_data |= 0x3F; |
2765 | ret_val = e1000e_write_kmrn_reg(hw, GG82563_REG(0x34, 9), reg_data); | 2766 | ret_val = e1000e_write_kmrn_reg(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
2767 | reg_data); | ||
2766 | if (ret_val) | 2768 | if (ret_val) |
2767 | return ret_val; | 2769 | return ret_val; |
2768 | 2770 | ||