From b49640648941e40ac441aadd979756c36ecfc090 Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Fri, 16 Oct 2015 10:51:19 +0800 Subject: [PATCH] e1000/base: allow both ULP and EEE in Sx state This patch implements a modified flow that allows both ULP and EEE in Sx (Sticky mode). Signed-off-by: Wenzhuo Lu --- drivers/net/e1000/base/e1000_ich8lan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index 6dc053f836..f62ad0bbbe 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -1154,10 +1154,15 @@ skip_smbus: if (to_sx) { if (E1000_READ_REG(hw, E1000_WUFC) & E1000_WUFC_LNKC) phy_reg |= I218_ULP_CONFIG1_WOL_HOST; + else + phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST; phy_reg |= I218_ULP_CONFIG1_STICKY_ULP; + phy_reg &= ~I218_ULP_CONFIG1_INBAND_EXIT; } else { phy_reg |= I218_ULP_CONFIG1_INBAND_EXIT; + phy_reg &= ~I218_ULP_CONFIG1_STICKY_ULP; + phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST; } e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); @@ -1178,6 +1183,7 @@ skip_smbus: mac_reg &= ~E1000_TCTL_EN; E1000_WRITE_REG(hw, E1000_TCTL, mac_reg); } + release: hw->phy.ops.release(hw); out: -- 2.20.1