This patch implements a modified flow that allows both ULP and EEE
in Sx(Sticky mode).

Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
---
 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 6dc053f..f62ad0b 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:
-- 
1.9.3

Reply via email to