net/e1000/base: disable force K1-off feature
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Wed, 23 Nov 2016 17:22:57 +0000 (12:22 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:36:48 +0000 (19:36 +0100)
MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
drivers/net/e1000/base/e1000_hw.h
drivers/net/e1000/base/e1000_ich8lan.c

index 14e2e87..39a2a41 100644 (file)
@@ -960,6 +960,7 @@ struct e1000_dev_spec_ich8lan {
        E1000_MUTEX nvm_mutex;
        E1000_MUTEX swflag_mutex;
        bool nvm_k1_enabled;
+       bool disable_k1_off;
        bool eee_disable;
        u16 eee_lp_ability;
 #ifdef ULP_SUPPORT
index 89265d2..92d92c8 100644 (file)
@@ -1688,6 +1688,9 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
                                fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE;
                }
 
+               if (hw->dev_spec.ich8lan.disable_k1_off == true)
+                       fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE;
+
                E1000_WRITE_REG(hw, E1000_FEXTNVM6, fextnvm6);
        }