]>
Commit | Line | Data |
---|---|---|
388682d7 GKH |
1 | From 6e01827ed93947895680fbdad68c072a0f4e2450 Mon Sep 17 00:00:00 2001 |
2 | From: Maxim Moseychuk <franchesko.salias.hudro.pedros@gmail.com> | |
3 | Date: Thu, 4 Jan 2018 21:43:03 +0300 | |
4 | Subject: usb: do not reset if a low-speed or full-speed device timed out | |
5 | ||
6 | From: Maxim Moseychuk <franchesko.salias.hudro.pedros@gmail.com> | |
7 | ||
8 | commit 6e01827ed93947895680fbdad68c072a0f4e2450 upstream. | |
9 | ||
10 | Some low-speed and full-speed devices (for example, bluetooth) | |
11 | do not have time to initialize. For them, ETIMEDOUT is a valid error. | |
12 | We need to give them another try. Otherwise, they will | |
13 | never be initialized correctly and in dmesg will be messages | |
14 | "Bluetooth: hci0 command 0x1002 tx timeout" or similars. | |
15 | ||
16 | Fixes: 264904ccc33c ("usb: retry reset if a device times out") | |
17 | Cc: stable <stable@vger.kernel.org> | |
18 | Signed-off-by: Maxim Moseychuk <franchesko.salias.hudro.pedros@gmail.com> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/usb/core/hub.c | 4 +++- | |
23 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
24 | ||
25 | --- a/drivers/usb/core/hub.c | |
26 | +++ b/drivers/usb/core/hub.c | |
27 | @@ -4405,7 +4405,9 @@ hub_port_init (struct usb_hub *hub, stru | |
28 | * reset. But only on the first attempt, | |
29 | * lest we get into a time out/reset loop | |
30 | */ | |
31 | - if (r == 0 || (r == -ETIMEDOUT && retries == 0)) | |
32 | + if (r == 0 || (r == -ETIMEDOUT && | |
33 | + retries == 0 && | |
34 | + udev->speed > USB_SPEED_FULL)) | |
35 | break; | |
36 | } | |
37 | udev->descriptor.bMaxPacketSize0 = |