Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp497416pxu; Thu, 26 Nov 2020 04:15:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFErX7suMFzy0y+lsttR4bloG7ZrkO3CBldwTzjYIc4g6aQNXlFTI2GaE03KveD/H78E67 X-Received: by 2002:a17:906:2ddb:: with SMTP id h27mr2395338eji.213.1606392942135; Thu, 26 Nov 2020 04:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606392942; cv=none; d=google.com; s=arc-20160816; b=spnQpJ76hGpF6D6u7OzuDfPigsBBTPCr9CtBh1yUy1vuN6hXXKhr2Axgzz8DnsB3ZN mRDxD4ca2LVoPAIkTlaOdWvEKUwQKR+Cyoqq0c8ljyfLcRPOnVvI8EEjZrrREHErBaJL a7efZ02yBUN1iTgT9jnELuXpwYg7PTeV43N5DIz9+wzTQMFZqonYC4ImlF/wD8Uho2E+ LWyXaLNEMeNc+Iql8tm4d6C6HBu/sYZtDP1zw1ejjR+fCnoAQ6oU6zhyz/PJgS3S3ru4 A9dk0sgAYqzmu/CHuCpS1oxAE2eDsLr59tWaIupo0vf6LBtJzNQPJaoeUZMRK1j/XxTk d0bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=n4sYtZ3rEPWKkff9rLaHY5Vd8bLDAar9FCx41tzzM3U=; b=y1xkWRWeWsRjwTwIMntfwhHCN3GYkTb/SJWZ3EHREAqYFZDoaopNjLwB7Vzq8zDc1t WvZuIJMY1cyWLzMceIbuqntF4/lyGHM8XJCs6Iv22okDzqH1klnQnyp/GmhpMzT/i1ns BvITNBiWqnzL/87MCEDyy5QluNjGdMb3shROwnd4aV9GI5aHiMAlztOLayiUbLoZd7qd GIaIG57+/Qn+3K/n6LEulJsGQdRCGZ4KTMJLFeUZTk55r39dvKL1pCJjWeGC8bf+hgTB OgViRe966hO7UmlADYMpaupncjMY/wKPfZcq+rlOn3sIRZPTzJIDywtTq8XV4oF/oKkb JU0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id re10si2197512ejb.754.2020.11.26.04.15.19; Thu, 26 Nov 2020 04:15:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387469AbgKZLuN (ORCPT + 99 others); Thu, 26 Nov 2020 06:50:13 -0500 Received: from mga18.intel.com ([134.134.136.126]:6064 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732480AbgKZLuM (ORCPT ); Thu, 26 Nov 2020 06:50:12 -0500 IronPort-SDR: n5N4lAokt0iYjkBmxaIixSLObneZzOwnvjAqYv/iT1idcFwpRW6a9gCcJ1QmZfINLbXspeRAqE rhvHeYgKZVrg== X-IronPort-AV: E=McAfee;i="6000,8403,9816"; a="160044513" X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="160044513" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 03:08:10 -0800 IronPort-SDR: /otGytfWFdq11RlkqghqeGVZ5TK8O2oVv3LITrALkdBxK95l6C9CFbg2bATVVs3oY3X+CXJeez +5Nka8IWZHmw== X-IronPort-AV: E=Sophos;i="5.78,371,1599548400"; d="scan'208";a="479318878" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 03:08:08 -0800 Date: Thu, 26 Nov 2020 19:10:54 +0800 From: Chen Yu To: Kai-Heng Feng Cc: "Rafael J. Wysocki" , Len Brown , Tony Nguyen , Jesse Brandeburg , "moderated list:INTEL ETHERNET DRIVERS" , Linux PM list , open list , Sasha Neftin , Jeff Kirsher , Chen Yu Subject: Re: [PATCH] e1000e: Assign DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME to speed up s2ram Message-ID: <20201126111053.GA15841@chenyu-office.sh.intel.com> References: <20201124153221.11265-1-yu.c.chen@intel.com> <8BA4D1E1-DACF-4E84-A5B8-75A7CEA65F98@canonical.com> <20201125103612.GA17700@chenyu-office.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 26, 2020 at 02:36:42PM +0800, Kai-Heng Feng wrote: > >> > >> What about plugging ethernet cable and using WoL after system is suspended? > >> Commit "e1000e: Exclude device from suspend direct complete optimization" was to address that scenario. [cut] > > I don't think this is right. > Isn't E1000_WUFC_LNKC already set for runtime suspend? > What if WoL doesn't have it set? > After re-taking a look at your description, please let me elaborate more about the scenario. With this patch applied, and with sysfs wake up disabled, the expected behavior is: 1. If NIC is not runtime suspended: 1.1 s2ram suspend -> wufc will be set to 0(no WoL settings), suspend(), suspend_late(), suspend_noirq() 1.2 s2ram resume -> NIC resumes normaly 2. If NIC is runtime suspended: 2.1 s2ram suspend -> wufc set to E1000_WUFC_LNKC, skip the subsequent suspend callbacks. 2.2 s2ram resume -> skip the subsequent resume callbacks. If between 2.1 and 2.2, the cable is plugged, the user is unable to use WoL to wake up the system. But if the sysfs wake up is enabled, the code logic falls into the old path, and the user can wake up the system via WoL by plugging the cable, and send packages to the system. Or do I miss something? thanks, Chenyu