e1000/base: fix beacon duration for i217
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Fri, 16 Oct 2015 02:51:11 +0000 (10:51 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 27 Oct 2015 15:12:56 +0000 (16:12 +0100)
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly.  This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.

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

index 60c31c2..ba22f52 100644 (file)
@@ -1475,6 +1475,20 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
                        return ret_val;
        }
 
+       /* I217 Packet Loss issue:
+        * ensure that FEXTNVM4 Beacon Duration is set correctly
+        * on power up.
+        * Set the Beacon Duration for I217 to 8 usec
+        */
+       if (hw->mac.type == e1000_pch_lpt) {
+               u32 mac_reg;
+
+               mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4);
+               mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
+               mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
+               E1000_WRITE_REG(hw, E1000_FEXTNVM4, mac_reg);
+       }
+
        /* Work-around I218 hang issue */
        if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
            (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||