* Patch "usb: retry reset if a device times out" has been added to the 4.4-stable tree
@ 2016-04-09 23:40 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-09 23:40 UTC (permalink / raw)
To: oneukum, gregkh; +Cc: stable, stable-commits
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.4-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.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 264904ccc33c604d4b3141bbd33808152dfac45b Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Wed, 10 Feb 2016 11:33:18 +0100
Subject: usb: retry reset if a device times out
From: Oliver Neukum <oneukum@suse.com>
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
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/core/hub.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4426,7 +4426,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 oneukum@suse.com are
queue-4.4/usb-cdc-acm-more-sanity-checking.patch
queue-4.4/usb-mct_u232-add-sanity-checking-in-probe.patch
queue-4.4/usb-digi_acceleport-do-sanity-checking-for-the-number-of-ports.patch
queue-4.4/usb-cypress_m8-add-endpoint-sanity-check.patch
queue-4.4/usb-retry-reset-if-a-device-times-out.patch
queue-4.4/usb-hub-fix-a-typo-in-hub_port_init-leading-to-wrong-logic.patch
queue-4.4/usb-usb_driver_claim_interface-add-sanity-checking.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-09 23:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-09 23:40 Patch "usb: retry reset if a device times out" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.