X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhub.c;fp=drivers%2Fusb%2Fcore%2Fhub.c;h=8eb2de6beee4b138f6fcda5bee34f77243c185fe;hb=68d8ecd4c48051273bbf611c53c260e24a528422;hp=92873f2773fc6ff62a8744f538a1bc681b466b21;hpb=eb236fd583ed1138fa1a66151db27e093316f128;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 92873f2773fc..8eb2de6beee4 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4167,7 +4167,13 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, 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 =