mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Alexandru Gagniuc <alexandru.gagniuc@hp.com>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, hayeswang@realtek.com, jflf_kernel@gmx.com,
	bjorn@mork.no, svenva@chromium.org, linux-kernel@vger.kernel.org,
	eniac-xw.zhang@hp.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] r8152: Suspend USB device before shutdown when WoL is enabled
Date: Thu, 20 Jul 2023 10:39:36 +0200	[thread overview]
Message-ID: <0a706af0-8b19-25c5-1a76-0add28f5d214@suse.com> (raw)
In-Reply-To: <20230719173756.380829-1-alexandru.gagniuc@hp.com>



On 19.07.23 19:37, Alexandru Gagniuc wrote:
> For Wake-on-LAN to work from S5 (shutdown), the USB link must be put
> in U3 state. If it is not, and the host "disappears", the chip will
> no longer respond to WoL triggers.

First, a question, does this also apply to S4?

> To resolve this, add a notifier block and register it as a reboot
> notifier. When WoL is enabled, work through the usb_device struct to
> get to the suspend function. Calling this function puts the link in
> the correct state for WoL to function.

Second, do we really want this to be done for every driver with this issue
or do we want a flag for core USB code to suspend devices when the system
goes down? UAS at least does something similar.

Third, what happens if the device is already suspended when the notifier runs?

	Regards
		Oliver


      parent reply	other threads:[~2023-07-20  8:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 18:28 [PATCH] " Alexandru Gagniuc
2023-07-08  0:12 ` Jakub Kicinski
2023-07-08  1:51   ` Alan Stern
2023-07-19 17:37     ` [PATCH v2] " Alexandru Gagniuc
2023-07-19 18:36       ` Alan Stern
2023-08-02 14:56         ` Gagniuc, Alexandru
2023-08-02 15:23           ` Alan Stern
2023-08-10 16:22         ` Alexandru Gagniuc
2023-08-10 17:34           ` Alan Stern
2023-08-10 22:51             ` Alexandru Gagniuc
2023-08-11  1:51               ` Alan Stern
2023-07-20  8:39       ` Oliver Neukum [this message]

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=0a706af0-8b19-25c5-1a76-0add28f5d214@suse.com \
    --to=oneukum@suse.com \
    --cc=alexandru.gagniuc@hp.com \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eniac-xw.zhang@hp.com \
    --cc=hayeswang@realtek.com \
    --cc=jflf_kernel@gmx.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=svenva@chromium.org \
    /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

all inboxes | Powered by JetHome®