Message ID | 20200402042228.120361-2-aaron.ma@canonical.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: SAUCE: Fix s2idle failed on e1000e | expand |
On 02.04.20 06:22, Aaron Ma wrote: > BugLink: https://bugs.launchpad.net/bugs/1865570 > > ME takes 2+ seconds to un-configure ULP mode done after resume > from s2idle on some ThinkPad laptops. > Without enough wait, reset and re-init will fail with error. > > Fixes: f15bb6dde738cc8fa0 ("e1000e: Add support for S0ix") > BugLink: https://bugs.launchpad.net/bugs/1865570 > Signed-off-by: Aaron Ma <aaron.ma@canonical.com> > (cherry picked from commit 29ae4ba09c15869dd3dc9b76f92d9d6d50249885 > https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git > dev-queue) > Signed-off-by: Aaron Ma <aaron.ma@canonical.com> This has lower risk than the original fix, looks good to me. This patch came in after the cutoff date for the next SRU cycle, however as the original fix was sent more than a week ago and this is affecting users, I think we can apply it this week. Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > --- > drivers/net/ethernet/intel/e1000e/ich8lan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c > index c1e0e03dc5cb..9a3edf3ec9db 100644 > --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c > +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c > @@ -1237,9 +1237,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force) > ew32(H2ME, mac_reg); > } > > - /* Poll up to 300msec for ME to clear ULP_CFG_DONE. */ > + /* Poll up to 2.5sec for ME to clear ULP_CFG_DONE. */ > while (er32(FWSM) & E1000_FWSM_ULP_CFG_DONE) { > - if (i++ == 30) { > + if (i++ == 250) { > ret_val = -E1000_ERR_PHY; > goto out; > } >
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index c1e0e03dc5cb..9a3edf3ec9db 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -1237,9 +1237,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force) ew32(H2ME, mac_reg); } - /* Poll up to 300msec for ME to clear ULP_CFG_DONE. */ + /* Poll up to 2.5sec for ME to clear ULP_CFG_DONE. */ while (er32(FWSM) & E1000_FWSM_ULP_CFG_DONE) { - if (i++ == 30) { + if (i++ == 250) { ret_val = -E1000_ERR_PHY; goto out; }