diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-05-05 18:00:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-06 04:31:28 -0400 |
commit | 6dfaa76994e5d49a82afb415bbe1362e901b2b95 (patch) | |
tree | ab1629de17f4d8763343b6d53ee58a674bb7d2e4 /drivers/net/e1000e/ich8lan.c | |
parent | ffb273623bc506d854902a415ef241b79232f93a (diff) |
e1000e: reset MAC-PHY interconnect on 82577/82578 during Sx->S0
During Sx->S0 transitions, the interconnect between the MAC and PHY on
82577/82578 can remain in SMBus mode instead of transitioning to the
PCIe-like mode required during normal operation. Toggling the LANPHYPC
Value bit essentially resets the interconnect forcing it to the correct
mode.
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>
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 5059c22155d9..0bfef8e16a7b 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -83,6 +83,8 @@ | |||
83 | 83 | ||
84 | 84 | ||
85 | #define E1000_ICH_FWSM_RSPCIPHY 0x00000040 /* Reset PHY on PCI Reset */ | 85 | #define E1000_ICH_FWSM_RSPCIPHY 0x00000040 /* Reset PHY on PCI Reset */ |
86 | /* FW established a valid mode */ | ||
87 | #define E1000_ICH_FWSM_FW_VALID 0x00008000 | ||
86 | 88 | ||
87 | #define E1000_ICH_MNG_IAMT_MODE 0x2 | 89 | #define E1000_ICH_MNG_IAMT_MODE 0x2 |
88 | 90 | ||
@@ -259,6 +261,7 @@ static inline void __ew32flash(struct e1000_hw *hw, unsigned long reg, u32 val) | |||
259 | static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | 261 | static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) |
260 | { | 262 | { |
261 | struct e1000_phy_info *phy = &hw->phy; | 263 | struct e1000_phy_info *phy = &hw->phy; |
264 | u32 ctrl; | ||
262 | s32 ret_val = 0; | 265 | s32 ret_val = 0; |
263 | 266 | ||
264 | phy->addr = 1; | 267 | phy->addr = 1; |
@@ -274,6 +277,23 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
274 | phy->ops.power_down = e1000_power_down_phy_copper_ich8lan; | 277 | phy->ops.power_down = e1000_power_down_phy_copper_ich8lan; |
275 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; | 278 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; |
276 | 279 | ||
280 | if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) { | ||
281 | /* | ||
282 | * The MAC-PHY interconnect may still be in SMBus mode | ||
283 | * after Sx->S0. Toggle the LANPHYPC Value bit to force | ||
284 | * the interconnect to PCIe mode, but only if there is no | ||
285 | * firmware present otherwise firmware will have done it. | ||
286 | */ | ||
287 | ctrl = er32(CTRL); | ||
288 | ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; | ||
289 | ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; | ||
290 | ew32(CTRL, ctrl); | ||
291 | udelay(10); | ||
292 | ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE; | ||
293 | ew32(CTRL, ctrl); | ||
294 | msleep(50); | ||
295 | } | ||
296 | |||
277 | phy->id = e1000_phy_unknown; | 297 | phy->id = e1000_phy_unknown; |
278 | ret_val = e1000e_get_phy_id(hw); | 298 | ret_val = e1000e_get_phy_id(hw); |
279 | if (ret_val) | 299 | if (ret_val) |