Skip to content

Commit beee807

Browse files
Yanir LubetkinJeff Kirsher
authored andcommitted
e1000e: synchronization of MAC-PHY interface only on non- ME systems
On power up, the MAC - PHY interface needs to be set to PCIe, even if cable is disconnected. In ME systems, the ME handles this on exit from Sx state. In non-ME, the driver handles it. Added a check for non-ME system to the driver code that handles that. Signed-off-by: Yanir Lubetkin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent beb0a15 commit beee807

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,19 @@ static bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw)
237237
if (ret_val)
238238
return false;
239239
out:
240-
if ((hw->mac.type == e1000_pch_lpt) ||
241-
(hw->mac.type == e1000_pch_spt)) {
242-
/* Unforce SMBus mode in PHY */
243-
e1e_rphy_locked(hw, CV_SMB_CTRL, &phy_reg);
244-
phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
245-
e1e_wphy_locked(hw, CV_SMB_CTRL, phy_reg);
240+
if ((hw->mac.type == e1000_pch_lpt) || (hw->mac.type == e1000_pch_spt)) {
241+
/* Only unforce SMBus if ME is not active */
242+
if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
243+
/* Unforce SMBus mode in PHY */
244+
e1e_rphy_locked(hw, CV_SMB_CTRL, &phy_reg);
245+
phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
246+
e1e_wphy_locked(hw, CV_SMB_CTRL, phy_reg);
246247

247-
/* Unforce SMBus mode in MAC */
248-
mac_reg = er32(CTRL_EXT);
249-
mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
250-
ew32(CTRL_EXT, mac_reg);
248+
/* Unforce SMBus mode in MAC */
249+
mac_reg = er32(CTRL_EXT);
250+
mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
251+
ew32(CTRL_EXT, mac_reg);
252+
}
251253
}
252254

253255
return true;

0 commit comments

Comments
 (0)