Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
---
 drivers/net/e1000/base/e1000_ich8lan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/e1000/base/e1000_ich8lan.c 
b/drivers/net/e1000/base/e1000_ich8lan.c
index 228d4c5..5077a3f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1089,6 +1089,9 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool 
to_sx)
                          (E1000_READ_REG(hw, E1000_FEXT) &
                           E1000_FEXT_PHY_CABLE_DISCONNECTED) ? "" : "not",
                          i * 50);
+               if (!(E1000_READ_REG(hw, E1000_FEXT) &
+                   E1000_FEXT_PHY_CABLE_DISCONNECTED))
+                       return 0;
        }

        if (E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID) {
-- 
1.9.3

Reply via email to