Message ID | 1396308899-20926-2-git-send-email-jeffrey.t.kirsher@intel.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Hello. On 01-04-2014 3:34, Jeff Kirsher wrote: > From: David Ertman <davidx.m.ertman@intel.com> > In commit da1e2046e5, the flow for enabling/disabling an Si errata Please also specify that commit's summary line in parens. > 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> > --- > drivers/net/ethernet/intel/e1000e/netdev.c | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-) [...] WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 31, 2014 at 8:34 PM, Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote: > From: David Ertman <davidx.m.ertman@intel.com> > > 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> Maybe a Reported-by tag from Thomas is missing? Regards, Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 1 Apr 2014, Fabio Estevam wrote: > On Mon, Mar 31, 2014 at 8:34 PM, Jeff Kirsher > <jeffrey.t.kirsher@intel.com> wrote: > > From: David Ertman <davidx.m.ertman@intel.com> > > > > 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> > > Maybe a Reported-by tag from Thomas is missing? Plus a Tested-by: me :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2014-03-31 at 16:34 -0700, Jeff Kirsher wrote: > From: David Ertman <davidx.m.ertman@intel.com> > > 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. [...] Which devices are affected by this? I just did a backport of e1000e from 3.13 for Debian 7.5 and didn't spot this fix until later. I couldn't reproduce this problem on my laptop, which has: 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04) Ben.
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index f1cce59..dce377b 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) u32 rctl, rfctl; u32 pages = 0; - /* Workaround Si errata on PCHx - configure jumbo frame flow */ - if ((hw->mac.type >= e1000_pch2lan) && - (adapter->netdev->mtu > ETH_DATA_LEN) && - e1000_lv_jumbo_workaround_ich8lan(hw, true)) - e_dbg("failed to enable jumbo frame workaround mode\n"); + /* Workaround Si errata on PCHx - configure jumbo frame flow. + * If jumbo frames not set, program related MAC/PHY registers + * to h/w defaults + */ + if (hw->mac.type >= e1000_pch2lan) { + s32 ret_val; + + if (adapter->netdev->mtu > ETH_DATA_LEN) + ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true); + else + ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false); + + if (ret_val) + e_dbg("failed to enable|disable jumbo frame workaround mode\n"); + } /* Program MC offset vector base */ rctl = er32(RCTL);