Patch "usb: retry reset if a device times out" has been added to the 4.5-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
usb: retry reset if a device times out
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-retry-reset-if-a-device-times-out.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
264904ccc33c604d4b3141bbd33808152dfac45bMon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Wed, 10 Feb 2016 11:33:18 +0100
Subject: usb: retry reset if a device times out
From: Oliver Neukum <[email protected]>
commit 264904ccc33c604d4b3141bbd33808152dfac45b upstream.
Some devices I got show an inability to operate right after power on if they are already connected. They are beyond recovery if the descriptors are requested multiple times. So in case of a timeout we rather bail early and reset again. But it must be done only on the first loop lest we get into a reset/time out spiral that can be overcome with a retry.
This patch is a rework of a patch that fell through the cracks.
http://www.spinics.net/lists/linux-usb/msg103263.html
--- drivers/usb/core/hub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/usb/core/hub.c +7 -1
@@ -4441,7 +4441,13 @@ hub_port_init(struct usb_hub *hub, struc r = -EPROTO ;break ; } -if (r ==0 ) +/* +* Some devices time out if they are powered on +* when already connected. They need a second +* reset. But only on the first attempt, +* lest we get into a time out/reset loop +*/ +if (r ==0 || (r == -ETIMEDOUT && j ==0 ))break ; } udev->descriptor.bMaxPacketSize0 =
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/usb-cdc-acm-more-sanity-checking.patch queue-4.5/usb-mct_u232-add-sanity-checking-in-probe.patch queue-4.5/usb-digi_acceleport-do-sanity-checking-for-the-number-of-ports.patch queue-4.5/usb-cypress_m8-add-endpoint-sanity-check.patch queue-4.5/usb-retry-reset-if-a-device-times-out.patch queue-4.5/usb-hub-fix-a-typo-in-hub_port_init-leading-to-wrong-logic.patch queue-4.5/usb-usb_driver_claim_interface-add-sanity-checking.patch