Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b04395c authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent d4f748ee
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3568,6 +3568,7 @@ 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-" : ""));
		if (udev->parent != udev->bus->root_hub)
			usleep_range(USB_RESUME_TIMEOUT * 1000,
					(USB_RESUME_TIMEOUT + 1) * 1000);

+1 −1
Original line number Diff line number Diff line
@@ -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