aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000e/netdev.c
diff options
context:
space:
mode:
authorDavid Ertman <davidx.m.ertman@intel.com>2014-03-25 00:27:55 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-03-31 18:47:59 -0400
commitb20a774495671f037e7160ea2ce8789af6b61533 (patch)
tree371756a58112278899750aee8a94639902591062 /drivers/net/ethernet/intel/e1000e/netdev.c
parent0b70195e0c3206103be991e196c26fcf168d0334 (diff)
e1000e: Fix no connectivity when driver loaded with cable out
In commit da1e2046e5, the flow for enabling/disabling an Si errata workaround (e1000_lv_jumbo_workaround_ich8lan) was changed to fix a problem with iAMT connections dropping on interface down with jumbo frames set. Part of this change was to move the function call disabling the workaround to e1000e_down() from the e1000_setup_rctl() function. The mechanic for disabling of this workaround involves writing several MAC and PHY registers back to hardware defaults. After this commit, when the driver is loaded with the cable out, the PHY registers are not programmed with the correct default values. This causes the device to be capable of transmitting packets, but is unable to recieve them until this workaround is called. The flow of e1000e's open code relies upon calling the above workaround to expicitly program these registers either with jumbo frame appropriate settings or h/w defaults on 82579 and newer hardware. Fix this issue by adding logic to e1000_setup_rctl() that not only calls e1000_lv_jumbo_workaround_ich8lan() when jumbo frames are set, to enable the workaround, but also calls this function to explicitly disable the workaround in the case that jumbo frames are not set. Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/netdev.c')
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index f1cce5928e20..dce377b59b2c 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -2991,11 +2991,21 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
2991 u32 rctl, rfctl; 2991 u32 rctl, rfctl;
2992 u32 pages = 0; 2992 u32 pages = 0;
2993 2993
2994 /* Workaround Si errata on PCHx - configure jumbo frame flow */ 2994 /* Workaround Si errata on PCHx - configure jumbo frame flow.
2995 if ((hw->mac.type >= e1000_pch2lan) && 2995 * If jumbo frames not set, program related MAC/PHY registers
2996 (adapter->netdev->mtu > ETH_DATA_LEN) && 2996 * to h/w defaults
2997 e1000_lv_jumbo_workaround_ich8lan(hw, true)) 2997 */
2998 e_dbg("failed to enable jumbo frame workaround mode\n"); 2998 if (hw->mac.type >= e1000_pch2lan) {
2999 s32 ret_val;
3000
3001 if (adapter->netdev->mtu > ETH_DATA_LEN)
3002 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true);
3003 else
3004 ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false);
3005
3006 if (ret_val)
3007 e_dbg("failed to enable|disable jumbo frame workaround mode\n");
3008 }
2999 3009
3000 /* Program MC offset vector base */ 3010 /* Program MC offset vector base */
3001 rctl = er32(RCTL); 3011 rctl = er32(RCTL);