mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
usb: core: Reduce resume signalling time for devices behind external hub
Squashing commit 28f110a27130("usb: core: Add support to skip
extended bus resume delay") and e97aab2199f3("usb: core: Drive resume
for 20ms for devices behind external hub") with few modifications.
This change removes extra 40ms delay upon bus resume for the
exteral hub and reduce the resume signalling time from 40ms to
20ms for devices behind the external hub(s). Skipping extra
delay reduces over all bus resume latency.
Change-Id: I948626bbaae0c78553543347a1c7d5b8168c08cd
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
d4f748eefb
commit
9b04395cec
2 changed files with 4 additions and 3 deletions
|
|
@ -3568,8 +3568,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|||
/* drive resume for USB_RESUME_TIMEOUT msec */
|
||||
dev_dbg(&udev->dev, "usb %sresume\n",
|
||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
|
||||
usleep_range(USB_RESUME_TIMEOUT * 1000,
|
||||
(USB_RESUME_TIMEOUT + 1) * 1000);
|
||||
if (udev->parent != udev->bus->root_hub)
|
||||
usleep_range(USB_RESUME_TIMEOUT * 1000,
|
||||
(USB_RESUME_TIMEOUT + 1) * 1000);
|
||||
|
||||
/* Virtual root hubs can trigger on GET_PORT_STATUS to
|
||||
* stop resume signaling. Then finish the resume
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ void usb_put_intf(struct usb_interface *intf);
|
|||
* should cope with both LPJ calibration errors and devices not following every
|
||||
* detail of the USB Specification.
|
||||
*/
|
||||
#define USB_RESUME_TIMEOUT 40 /* ms */
|
||||
#define USB_RESUME_TIMEOUT 20 /* ms */
|
||||
|
||||
/**
|
||||
* struct usb_interface_cache - long-term representation of a device interface
|
||||
|
|
|
|||
Loading…
Reference in a new issue