From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94CD7C1975A for ; Wed, 25 Mar 2020 06:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70439206F6 for ; Wed, 25 Mar 2020 06:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbgCYGnt (ORCPT ); Wed, 25 Mar 2020 02:43:49 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44499 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbgCYGnt (ORCPT ); Wed, 25 Mar 2020 02:43:49 -0400 Received: from [222.129.50.174] (helo=[192.168.1.33]) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jGzlS-0007i8-6Z; Wed, 25 Mar 2020 06:43:47 +0000 Subject: Re: [PATCH] e1000e: bump up timeout to wait when ME un-configure ULP mode To: "Neftin, Sasha" , Kai-Heng Feng Cc: "Kirsher, Jeffrey T" , David Miller , "moderated list:INTEL ETHERNET DRIVERS" , "open list:NETWORKING DRIVERS" , open list , "Lifshits, Vitaly" , rex.tsai@intel.com References: <20200323191639.48826-1-aaron.ma@canonical.com> <2c765c59-556e-266b-4d0d-a4602db94476@intel.com> From: Aaron Ma Autocrypt: addr=aaron.ma@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Msl75jDTDJMEYgRYEBT1D/bwxdIeoN1BfIG mYgf059RrWax4SMiJtVDSUuDOpdwoEcZ0FWesRfbFrM+k/XKiIbjMZSvLunA4FIsOdWYOob4 Hh0rsm1G+fBLYtT+bE26OWpQ/lSn4TdhABEBAAGJAR8EGAEIAAkFAlffeLkCGwwACgkQzcQs 0H1VOp6p5Af/ap5EVuP1AhFdPD3pXLNrUUt72W3cuAOjXyss43qFC2YRjGfktrizsDjQU46g VKoD6EW9XUPgvYM+k8BJEoXDLhHWnCnMKlbHP3OImxzLRhF4kdlnLicz1zKRcessQatRpJgG NIiD+eFyh0CZcWBO1BB5rWikjO/idicHao2stFdaBmIeXvhT9Xp6XNFEmzOmfHps+kKpWshY 9LDAU0ERBNsW4bekOCa/QxfqcbZYRjrVQvya0EhrPhq0bBpzkIL/7QSBMcdv6IajTlHnLARF nAIofCEKeEl7+ksiRapL5Nykcbt4dldE3sQWxIybC94SZ4inENKw6I8RNpigWm0R5w== Message-ID: <899895bc-fb88-a97d-a629-b514ceda296d@canonical.com> Date: Wed, 25 Mar 2020 14:43:31 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <2c765c59-556e-266b-4d0d-a4602db94476@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/20 2:36 PM, Neftin, Sasha wrote: > On 3/25/2020 06:17, Kai-Heng Feng wrote: >> Hi Aaron, >> >>> On Mar 24, 2020, at 03:16, Aaron Ma wrote: >>> >>> 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. >> >> Thanks, this patch solves the issue. We can drop the DMI quirk in >> favor of this patch. >> >>> >>> Fixes: f15bb6dde738cc8fa0 ("e1000e: Add support for S0ix") >>> BugLink: https://bugs.launchpad.net/bugs/1865570 >>> Signed-off-by: Aaron Ma >>> --- >>> 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 b4135c50e905..147b15a2f8b3 100644 >>> --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c >>> +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c >>> @@ -1240,9 +1240,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; >>>             } >> >> The return value was not caught by the caller, so the error ends up >> unnoticed. >> Maybe let the caller check the return value of >> e1000_disable_ulp_lpt_lp()? >> >> Kai-Heng > Hello Kai-Heng and Aaron, > I a bit confused. In our previous conversation you told ME not running. > let me shimming in. Increasing delay won't be solve the problem and just > mask it. We need to understand why ME take too much time. What is > problem with this specific system? > So, basically no ME system should works for you. Some laptops ME work that's why only reproduce issue on some laptops. In this issue i219 is controlled by ME. Quirk is only for 1 model type. But issue is reproduced by more models. So it won't work. Regard, Aaron > > Meanwhile I prefer keep DMI quirk. > Thanks, > Sasha >> >>> --  >>> 2.17.1 >>> >> > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ma Date: Wed, 25 Mar 2020 14:43:31 +0800 Subject: [Intel-wired-lan] [PATCH] e1000e: bump up timeout to wait when ME un-configure ULP mode In-Reply-To: <2c765c59-556e-266b-4d0d-a4602db94476@intel.com> References: <20200323191639.48826-1-aaron.ma@canonical.com> <2c765c59-556e-266b-4d0d-a4602db94476@intel.com> Message-ID: <899895bc-fb88-a97d-a629-b514ceda296d@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On 3/25/20 2:36 PM, Neftin, Sasha wrote: > On 3/25/2020 06:17, Kai-Heng Feng wrote: >> Hi Aaron, >> >>> On Mar 24, 2020, at 03:16, Aaron Ma wrote: >>> >>> 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. >> >> Thanks, this patch solves the issue. We can drop the DMI quirk in >> favor of this patch. >> >>> >>> Fixes: f15bb6dde738cc8fa0 ("e1000e: Add support for S0ix") >>> BugLink: https://bugs.launchpad.net/bugs/1865570 >>> Signed-off-by: Aaron Ma >>> --- >>> 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 b4135c50e905..147b15a2f8b3 100644 >>> --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c >>> +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c >>> @@ -1240,9 +1240,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; >>> ??????????? } >> >> The return value was not caught by the caller, so the error ends up >> unnoticed. >> Maybe let the caller check the return value of >> e1000_disable_ulp_lpt_lp()? >> >> Kai-Heng > Hello Kai-Heng and Aaron, > I a bit confused. In our previous conversation you told ME not running. > let me shimming in. Increasing delay won't be solve the problem and just > mask it. We need to understand why ME take too much time. What is > problem with this specific system? > So, basically no ME system should works for you. Some laptops ME work that's why only reproduce issue on some laptops. In this issue i219 is controlled by ME. Quirk is only for 1 model type. But issue is reproduced by more models. So it won't work. Regard, Aaron > > Meanwhile I prefer keep DMI quirk. > Thanks, > Sasha >> >>> --? >>> 2.17.1 >>> >> >