Merge "usb: core: Reduce resume signalling time for devices behind external hub"

This commit is contained in:
qctecmdr 2021-01-22 13:46:45 -08:00 • committed by Gerrit - the friendly Code Review server
commit c1cc7c0229
2 changed files with 5 additions and 3 deletions

View file

@ -3568,7 +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-" : ""));
msleep(USB_RESUME_TIMEOUT);
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
@ -3577,7 +3579,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
status = hub_port_status(hub, port1, &portstatus, &portchange);
/* TRSMRCY = 10 msec */
msleep(10);
usleep_range(10000, 10500);
}
SuspendCleared:

View file

@ -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