aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2011-02-25 01:58:03 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-03-11 05:05:26 -0500
commit1effb45cca29e22e4b2209bb567770b7e20a3a2b (patch)
tree32ea3837ac121d6d5777b673aa5ea8204134c1c2 /drivers/net/e1000e
parent5661aeb08edcef6799861f92817f593c1fd7b272 (diff)
e1000e: extend EEE LPI timer to prevent dropped link
The link can be unexpectedly dropped when the timer for entering EEE low- power-idle quiet state expires too soon. The timer needs to be extended from 196usec to 200usec after every LCD (PHY) reset to prevent this from happening. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/ich8lan.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 232b42b7f7c..cf18d65417e 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -140,6 +140,11 @@
140#define I82579_LPI_CTRL PHY_REG(772, 20) 140#define I82579_LPI_CTRL PHY_REG(772, 20)
141#define I82579_LPI_CTRL_ENABLE_MASK 0x6000 141#define I82579_LPI_CTRL_ENABLE_MASK 0x6000
142 142
143/* EMI Registers */
144#define I82579_EMI_ADDR 0x10
145#define I82579_EMI_DATA 0x11
146#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */
147
143/* Strapping Option Register - RO */ 148/* Strapping Option Register - RO */
144#define E1000_STRAP 0x0000C 149#define E1000_STRAP 0x0000C
145#define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000 150#define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000
@@ -1723,11 +1728,25 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
1723 /* Configure the LCD with the OEM bits in NVM */ 1728 /* Configure the LCD with the OEM bits in NVM */
1724 ret_val = e1000_oem_bits_config_ich8lan(hw, true); 1729 ret_val = e1000_oem_bits_config_ich8lan(hw, true);
1725 1730
1726 /* Ungate automatic PHY configuration on non-managed 82579 */ 1731 if (hw->mac.type == e1000_pch2lan) {
1727 if ((hw->mac.type == e1000_pch2lan) && 1732 /* Ungate automatic PHY configuration on non-managed 82579 */
1728 !(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) { 1733 if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
1729 msleep(10); 1734 msleep(10);
1730 e1000_gate_hw_phy_config_ich8lan(hw, false); 1735 e1000_gate_hw_phy_config_ich8lan(hw, false);
1736 }
1737
1738 /* Set EEE LPI Update Timer to 200usec */
1739 ret_val = hw->phy.ops.acquire(hw);
1740 if (ret_val)
1741 goto out;
1742 ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_ADDR,
1743 I82579_LPI_UPDATE_TIMER);
1744 if (ret_val)
1745 goto release;
1746 ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_DATA,
1747 0x1387);
1748release:
1749 hw->phy.ops.release(hw);
1731 } 1750 }
1732 1751
1733out: 1752out: