From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David Brownell <david-b@pacbell.net>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
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: [PATCH] USB: core: hub_port_reset: Remove extra 40 ms reset recovery time
Date: Wed, 24 Jul 2024 13:15:23 +0200 [thread overview]
Message-ID: <20240724111524.25441-1-pmenzel@molgen.mpg.de> (raw)
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
devices, where it’s not needed, like the Dell XPS 13 9360/0596KF, BIOS
2.21.0 06/02/2022 with
$ usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh=12
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=06.09
S: Manufacturer=Linux 6.9.0-rc6-00047-g25a99e110f17 xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0cf3 ProdID=e300 Rev=00.01
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
T: Bus=01 Lev=01 Prnt=02 Port=03 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04f3 ProdID=2234 Rev=11.11
S: Manufacturer=ELAN
S: Product=Touchscreen
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=2ms
E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms
T: Bus=01 Lev=01 Prnt=03 Port=04 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0c45 ProdID=670c Rev=56.26
S: Manufacturer=CN09GTFMLOG008C8B7FWA01
S: Product=Integrated_Webcam_HD
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=4ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 6
D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=06.09
S: Manufacturer=Linux 6.9.0-rc6-00047-g25a99e110f17 xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
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.
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 reply other threads:[~2024-07-24 11:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 11:15 Paul Menzel [this message]
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 ` [PATCH] USB: core: hub_port_reset: Remove extra 40 ms reset recovery time Alan Stern
2024-07-24 18:14 ` 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=20240724111524.25441-1-pmenzel@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--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 \
/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®