From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] USB: core: Enable root_hub's remote wakeup for wakeup sources
Date: Fri, 31 Jan 2025 11:49:35 +0100 [thread overview]
Message-ID: <2025013133-saddled-reptilian-63c3@gregkh> (raw)
In-Reply-To: <20250131100630.342995-1-chenhuacai@loongson.cn>
On Fri, Jan 31, 2025 at 06:06:30PM +0800, Huacai Chen wrote:
> Now we only enable the remote wakeup function for the USB wakeup source
> itself at usb_port_suspend(). But on pre-XHCI controllers this is not
> enough to enable the S3 wakeup function for USB keyboards, so we also
> enable the root_hub's remote wakeup (and disable it on error). Frankly
> this is unnecessary for XHCI, but enable it unconditionally make code
> simple and seems harmless.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
What commit id does this fix?
> ---
> drivers/usb/core/hub.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index c3f839637cb5..efd6374ccd1d 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3480,6 +3480,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
> if (PMSG_IS_AUTO(msg))
> goto err_wakeup;
> }
> + usb_enable_remote_wakeup(udev->bus->root_hub);
> }
>
> /* disable USB2 hardware LPM */
> @@ -3543,8 +3544,10 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
> /* Try to enable USB2 hardware LPM again */
> usb_enable_usb2_hardware_lpm(udev);
>
> - if (udev->do_remote_wakeup)
> + if (udev->do_remote_wakeup) {
> (void) usb_disable_remote_wakeup(udev);
> + (void) usb_disable_remote_wakeup(udev->bus->root_hub);
This feels wrong, what about all of the devices inbetween this device
and the root hub?
thanks,
greg k-h
next prev parent reply other threads:[~2025-01-31 10:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 10:06 Huacai Chen
2025-01-31 10:49 ` Greg Kroah-Hartman [this message]
2025-01-31 14:46 ` Huacai Chen
2025-01-31 15:17 ` Alan Stern
2025-02-01 6:42 ` Huacai Chen
2025-02-01 16:55 ` Alan Stern
2025-02-03 14:44 ` Huacai Chen
2025-02-03 15:12 ` Alan Stern
2025-02-03 16:01 ` Mingcong Bai
2025-02-03 16:15 ` Alan Stern
2025-02-05 5:59 ` Mingcong Bai
2025-02-05 18:25 ` Alan Stern
2025-02-06 3:49 ` Mingcong Bai
2025-02-06 21:20 ` Alan Stern
2025-02-07 3:23 ` Mingcong Bai
2025-02-09 10:19 ` Mingcong Bai
2025-02-09 10:22 ` Mingcong Bai
2025-02-25 17:41 ` Mingcong Bai
2025-02-25 22:37 ` Alan Stern
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=2025013133-saddled-reptilian-63c3@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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®