projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3.10.103' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
drivers
/
usb
/
core
/
hub.c
diff --git
a/drivers/usb/core/hub.c
b/drivers/usb/core/hub.c
index 5155d19f8b41b8fae637308d0f0ee2e1c502bf0f..c09b87b489f536ba7ab6a811c981a65c32970a2d 100644
(file)
--- a/
drivers/usb/core/hub.c
+++ b/
drivers/usb/core/hub.c
@@
-262,6
+262,10
@@
struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)
static int usb_device_supports_lpm(struct usb_device *udev)
{
static int usb_device_supports_lpm(struct usb_device *udev)
{
+ /* Some devices have trouble with LPM */
+ if (udev->quirks & USB_QUIRK_NO_LPM)
+ return 0;
+
/* USB 2.1 (and greater) devices indicate LPM support through
* their USB 2.0 Extended Capabilities BOS descriptor.
*/
/* USB 2.1 (and greater) devices indicate LPM support through
* their USB 2.0 Extended Capabilities BOS descriptor.
*/
@@
-1157,7
+1161,6
@@
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
}
if (type == HUB_INIT2)
goto init2;
}
if (type == HUB_INIT2)
goto init2;
-
goto init3;
}
kref_get(&hub->kref);
goto init3;
}
kref_get(&hub->kref);
@@
-3531,10
+3534,10
@@
int usb_port_resume(struct usb_device *udev, pm_message_t msg)
dev_dbg(hub->intfdev, "can't resume port %d, status %d\n",
port1, status);
} else {
dev_dbg(hub->intfdev, "can't resume port %d, status %d\n",
port1, status);
} else {
- /* drive resume for
at least 20
msec */
+ /* drive resume for
USB_RESUME_TIMEOUT
msec */
dev_dbg(&udev->dev, "usb %sresume\n",
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
dev_dbg(&udev->dev, "usb %sresume\n",
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
- msleep(
25
);
+ msleep(
USB_RESUME_TIMEOUT
);
/* Virtual root hubs can trigger on GET_PORT_STATUS to
* stop resume signaling. Then finish the resume
/* Virtual root hubs can trigger on GET_PORT_STATUS to
* stop resume signaling. Then finish the resume
@@
-4415,7
+4418,13
@@
hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
r = -EPROTO;
break;
}
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;
#if defined(CONFIG_USBIF_COMPLIANCE) && defined(CONFIG_USB_XHCI_HCD)
break;
#if defined(CONFIG_USBIF_COMPLIANCE) && defined(CONFIG_USB_XHCI_HCD)
@@
-4548,6
+4557,8
@@
hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
goto fail;
}
goto fail;
}
+ usb_detect_quirks(udev);
+
if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
retval = usb_get_bos_descriptor(udev);
if (!retval) {
if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
retval = usb_get_bos_descriptor(udev);
if (!retval) {
@@
-4798,7
+4809,6
@@
static void hub_port_connect_change(struct usb_hub *hub, int port1,
}
MYDBG("");
}
MYDBG("");
- usb_detect_quirks(udev);
if (udev->quirks & USB_QUIRK_DELAY_INIT)
msleep(1000);
if (udev->quirks & USB_QUIRK_DELAY_INIT)
msleep(1000);