From: Alan Stern <stern@rowland.harvard.edu>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David Brownell <david-b@pacbell.net>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Hans de Goede <hdegoede@redhat.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: core: hub_port_reset: Remove extra 40 ms reset recovery time
Date: Wed, 24 Jul 2024 10:10:48 -0400 [thread overview]
Message-ID: <c7c299e7-605c-4bd6-afad-dfbfe266aa7e@rowland.harvard.edu> (raw)
In-Reply-To: <20240724111524.25441-1-pmenzel@molgen.mpg.de>
On Wed, Jul 24, 2024 at 01:15:23PM +0200, Paul Menzel wrote:
> This basically reverts commit b789696af8b4102b7cc26dec30c2c51ce51ee18b
> ("[PATCH] USB: relax usbcore reset timings") from 2005.
>
> This adds unneeded 40 ms during resume from suspend on a majority of
Wrong. It adds 40 ms to the recovery time from a port reset -- see the
commit's title. Suspend and resume do not in general involve port
resets (although sometimes they do).
> devices, where it’s not needed, like the Dell XPS 13 9360/0596KF, BIOS
> 2.21.0 06/02/2022 with
> The commit messages unfortunately does not list the devices needing this.
> Should they surface again, these should be added to the quirk list for
> USB_QUIRK_HUB_SLOW_RESET.
This quirk applies to hubs that need extra time when one of their ports
gets reset. However, it seems likely that the patch you are reverting
was meant to help the device attached to the port, not the hub itself.
Which would mean that the adding hubs to the quirk list won't help
unless every hub is added -- in which case there's no point reverting
the patch.
Furthermore, should any of these bad hubs or devices still be in use,
your change would cause them to stop working reliably. It would be a
regression.
A better approach would be to add a sysfs boolean attribute to the hub
driver to enable the 40-ms reset-recovery delay, and make it default to
True. Then people who don't need the delay could disable it from
userspace, say by a udev rule.
Alan Stern
> Fixes: b789696af8b4 ("[PATCH] USB: relax usbcore reset timings")
> Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: David Brownell <david-b@pacbell.net>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> drivers/usb/core/hub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 4b93c0bd1d4b..487d5fe60f0c 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3110,7 +3110,7 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
> usleep_range(10000, 12000);
> else {
> /* TRSTRCY = 10 ms; plus some extra */
> - reset_recovery_time = 10 + 40;
> + reset_recovery_time = 10;
>
> /* Hub needs extra delay after resetting its port. */
> if (hub->hdev->quirks & USB_QUIRK_HUB_SLOW_RESET)
> --
> 2.45.2
>
>
next prev parent reply other threads:[~2024-07-24 14:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 11:15 Paul Menzel
2024-07-24 13:25 ` get_maintainer.pl finds old email address not in MAINTAINERS Paul Menzel
2024-07-24 14:02 ` Joe Perches
2024-07-24 14:10 ` Alan Stern [this message]
2024-07-24 18:14 ` [PATCH] USB: core: hub_port_reset: Remove extra 40 ms reset recovery time Paul Menzel
2024-07-24 18:52 ` Alan Stern
2024-07-24 21:00 ` Paul Menzel
2024-07-26 17:48 ` Alan Stern
2024-08-04 7:15 ` Paul Menzel
2024-08-04 13:19 ` Alan Stern
2024-08-05 9:17 ` Mathias Nyman
2024-08-05 21:41 ` Paul Menzel
2024-08-05 8:19 ` Paul Menzel
2024-08-05 13:38 ` 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=c7c299e7-605c-4bd6-afad-dfbfe266aa7e@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=david-b@pacbell.net \
--cc=gregkh@linuxfoundation.org \
--cc=gregkh@suse.de \
--cc=hdegoede@redhat.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pmenzel@molgen.mpg.de \
/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®