linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"moderated list:INTEL ETHERNET DRIVERS" 
	<intel-wired-lan@lists.osuosl.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Sasha Neftin <sasha.neftin@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Chen Yu <yu.c.chen@intel.com>
Subject: Re: [PATCH] e1000e: Assign DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME to speed up s2ram
Date: Thu, 26 Nov 2020 19:10:54 +0800	[thread overview]
Message-ID: <20201126111053.GA15841@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <B66CCBD9-5828-4514-AD08-C6FDF026646D@canonical.com>

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



  parent reply	other threads:[~2020-11-26 11:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 15:32 [PATCH] e1000e: Assign DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME to speed up s2ram Chen Yu
2020-11-24 15:47 ` [Intel-wired-lan] " Paul Menzel
2020-11-25 10:15   ` Chen Yu
2020-11-24 17:17 ` Kai-Heng Feng
2020-11-25 10:36   ` Chen Yu
2020-11-26  6:36     ` Kai-Heng Feng
2020-11-26  7:07       ` Chen Yu
2020-11-26 11:10       ` Chen Yu [this message]
2020-11-26 12:05         ` Kai-Heng Feng
2020-11-26 14:45           ` Chen Yu
2020-11-27 12:20             ` Kai-Heng Feng
2020-12-01  0:57               ` Chen Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201126111053.GA15841@chenyu-office.sh.intel.com \
    --to=yu.c.chen@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sasha.neftin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).