Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1627578ybb; Thu, 26 Mar 2020 04:30:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtasydz43BKhl+xIUimXmz5pfyFGi2+EIWo0llfck7UIyUGzAPva5F7Ow/AjhS/yd6ARHCa X-Received: by 2002:a05:6830:1bef:: with SMTP id k15mr5596476otb.372.1585222251221; Thu, 26 Mar 2020 04:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585222251; cv=none; d=google.com; s=arc-20160816; b=JqJBfi0CpdMK2KONLadRFlfp0ImoF+alcTWSGZmlurTWJO1I1wVk2hQDQUhKuoRi2W VRKnfRWA6RcV5CgkRPBXi/T1WSuW2KtPx5d2AJhKCyF30Z9KbvBwk0gLodxlteNb7nhB dnuDRA+QS2F8ABLkXHfz5yONRt78wNb1BXDG98F9mS+Trt3RpGpRD/JhyDyfb5YOky9g flYaEsPkbUUgY0/1RwOYf6d3iP1fnRKodyMUHOCdTIh/5s12prRnWTJa5OAhanSPAc1Y 2Oy6CHtdZ2TYqVGmyKPaogrF+UBzOG8/pFqu8TdHpi7gAi9cXvCcMCiiBBU+dCCSlVn6 cQqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=SFxrWe62DCStF2nRlGwfN0BjOL0nrXw3vWIAioaU8cU=; b=S2+XcGZlbiLYn6fgEWxJXg1shizZBj/a3cc68muUqfljN/6CrVi3o+EpwjQtGQDW6Q olJ08fet0Ghin8Nr4D3KYEcuWpZHPjSu2SwIDxOzuvSqWUyerKeLKJxQettcR35dQJ/3 SuBExbgVtaqe0NNTp5GqGCL2mno9yOeMLp0erllTwQgQpNSbjn23SCivyzN/JAxx+LQ2 xI3klgVKXZSZBfvMrD05Teql/HXZ49P0zHvaVKNtfCL1rIU23SCSoa43k9H7QRmTJOoV jg4V95z02HKn6eZQsasN9B5PuET6hnocJ5w5o36q6PpRts1UowRYjJave580Ubn3oLfF iiAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c130si939118oig.98.2020.03.26.04.30.38; Thu, 26 Mar 2020 04:30:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728080AbgCZLaI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 26 Mar 2020 07:30:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:36112 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbgCZLaI (ORCPT ); Thu, 26 Mar 2020 07:30:08 -0400 Received: from mail-pg1-f199.google.com ([209.85.215.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jHQi5-0000jE-HK for linux-kernel@vger.kernel.org; Thu, 26 Mar 2020 11:30:05 +0000 Received: by mail-pg1-f199.google.com with SMTP id z29so4458656pgc.23 for ; Thu, 26 Mar 2020 04:30:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HALfYwFfeY5UrbJ7xe/bm/b+wfD4jWuw8RPBvgJnNt8=; b=KyisNW0ZYy8LHlgHBCkk6vZSANLiIwbNWJ3cJwqEYmsRkfPzyXLqs0zU60M5RDlYVF u8thtcCvrBs5KeFHRKj6wk0DCGZuso2YqLCEMjGLhrRB4VsRmvt+wHBrMAS3xKG2YcLY VUf6Vwr3RslGRxV+yNmLcneiG9Xu9bSgKnsNXcBo/kokaAiLCHBr+bxJYda8uOSnpL5J lz6kyXm+QUjX8w/gTzJ72cRGLJlpTmLiJCUWpXl2U5KoLCtahqSzfuZKC+w6AtTojD9h e+2MzOER9E5nGI7PBm6TDyVq6pUbaPKJaDJ94JZEgbNNNUpvi6DsMhlmJuLJLMTaFe84 gIhg== X-Gm-Message-State: ANhLgQ1zaPSQyajlby4aRTCKTcDhrE91xFMBOwA/QEQuwlFWdzNM1QKr 3DwqDV/rWS/VKf9MKKGdiMySlyJ6KKAFNnZzX2GIippVwpl19kjoveoWYQsubWDcqSrPu99aqNJ xDOcrkS/PFhKi9rjX/xsG6ZoQHe6Gtv4h9Pd9EE3kyQ== X-Received: by 2002:a17:90a:d081:: with SMTP id k1mr2764267pju.57.1585222203902; Thu, 26 Mar 2020 04:30:03 -0700 (PDT) X-Received: by 2002:a17:90a:d081:: with SMTP id k1mr2764220pju.57.1585222203472; Thu, 26 Mar 2020 04:30:03 -0700 (PDT) Received: from [192.168.1.208] (220-133-187-190.HINET-IP.hinet.net. [220.133.187.190]) by smtp.gmail.com with ESMTPSA id y131sm1454645pfb.78.2020.03.26.04.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 04:30:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: [Intel-wired-lan] [PATCH] e1000e: bump up timeout to wait when ME un-configure ULP mode From: Kai-Heng Feng In-Reply-To: Date: Thu, 26 Mar 2020 19:29:59 +0800 Cc: Sasha Neftin , Aaron Ma , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, David Miller , Rex Tsai Content-Transfer-Encoding: 8BIT Message-Id: <60A8493D-811B-4AD5-A8D3-82054B562A8C@canonical.com> References: <20200323191639.48826-1-aaron.ma@canonical.com> <2c765c59-556e-266b-4d0d-a4602db94476@intel.com> <899895bc-fb88-a97d-a629-b514ceda296d@canonical.com> <750ad0ad-816a-5896-de2f-7e034d2a2508@intel.com> To: Paul Menzel X-Mailer: Apple Mail (2.3608.60.0.2.5) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, > On Mar 25, 2020, at 23:49, Paul Menzel wrote: > > Dear Linux folks, > > > Am 25.03.20 um 14:58 schrieb Neftin, Sasha: >> On 3/25/2020 08:43, Aaron Ma wrote: > >>> On 3/25/20 2:36 PM, Neftin, Sasha wrote: >>>> On 3/25/2020 06:17, Kai-Heng Feng wrote: > >>>>>> 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()? > >>>> 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. >> >> Who can explain - why ME required too much time on this system? >> Probably need work with ME/BIOS vendor and understand it. >> Delay will just mask the real problem - we need to find root cause. >>> Quirk is only for 1 model type. But issue is reproduced by more models. >>> So it won't work. > > (Where is Aaron’s reply? It wasn’t delivered to me yet.) > > As this is clearly a regression, please revert the commit for now, and then find a way to correctly implement S0ix support. Linux’ regression policy demands that as no fix has been found since v5.5-rc1. Changing Intel ME settings, even if it would work around the issue, is not an acceptable solution. Delaying the resume time is also not a solution. The s0ix patch can reduce power consumption, finally makes S2idle an acceptable sleep method. So I'd say it's a fix, albeit a regression was introduced. > > Regarding Intel Management Engine, only Intel knows what it does and what the error is, as the ME firmware is proprietary and closed. > > Lastly, there is no way to fully disable the Intel Management Engine. The HAP stuff claims to stop the Intel ME execution, but nobody knows, if it’s successful. > > Aaron, Kai-Hang, can you send the revert? I consider that as an important fix for s2idle, I don't think reverting is appropriate. Kai-Heng > > > Kind regards, > > Paul > >