diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2012-04-20 11:24:50 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-05 08:05:22 -0400 |
commit | 1f56f45df9f19cdb87bb90020163046f09df9b45 (patch) | |
tree | be6b3056c85a34fbc98af38389390d294df79c97 /drivers/net | |
parent | 7b9f7e3500ae118bbd5833425e318647da8901f4 (diff) |
e1000e: clear REQ and GNT in EECD (82571 && 82572)
Clear the REQ and GNT bit in the eeprom control register (EECD).
This is required if the eeprom is to be accessed with auto read
EERD register.
After a cold reset this doesn't matter but if PBIST MAC test was
executed before booting, the register was left in a dirty state
(the 2 bits where set), which caused the read operation to time out
and returning 0.
Reference (page 312):
http://download.intel.com/design/network/manuals/316080.pdf
Reported-by: Aleksandar Igic <aleksandar.igic@dektech.com.au>
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 6a8a908f92b8..36db4df09aed 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
@@ -999,7 +999,7 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active) | |||
999 | **/ | 999 | **/ |
1000 | static s32 e1000_reset_hw_82571(struct e1000_hw *hw) | 1000 | static s32 e1000_reset_hw_82571(struct e1000_hw *hw) |
1001 | { | 1001 | { |
1002 | u32 ctrl, ctrl_ext; | 1002 | u32 ctrl, ctrl_ext, eecd; |
1003 | s32 ret_val; | 1003 | s32 ret_val; |
1004 | 1004 | ||
1005 | /* | 1005 | /* |
@@ -1072,6 +1072,16 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) | |||
1072 | */ | 1072 | */ |
1073 | 1073 | ||
1074 | switch (hw->mac.type) { | 1074 | switch (hw->mac.type) { |
1075 | case e1000_82571: | ||
1076 | case e1000_82572: | ||
1077 | /* | ||
1078 | * REQ and GNT bits need to be cleared when using AUTO_RD | ||
1079 | * to access the EEPROM. | ||
1080 | */ | ||
1081 | eecd = er32(EECD); | ||
1082 | eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT); | ||
1083 | ew32(EECD, eecd); | ||
1084 | break; | ||
1075 | case e1000_82573: | 1085 | case e1000_82573: |
1076 | case e1000_82574: | 1086 | case e1000_82574: |
1077 | case e1000_82583: | 1087 | case e1000_82583: |