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

Commit c06f4f75 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: core: Drive resume for 20ms for devices behind external hub"

parents fccaa4da e97aab21
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -53,6 +53,11 @@ static void hub_event(struct work_struct *work);
/* synchronize hub-port add/remove and peering operations */
DEFINE_MUTEX(usb_port_peer_mutex);

static bool skip_extended_resume_delay = 1;
module_param(skip_extended_resume_delay, bool, 0644);
MODULE_PARM_DESC(skip_extended_resume_delay,
		"removes extra delay added to finish bus resume");

/* cycle leds on hubs that aren't blinking for attention */
static bool blinkenlights;
module_param(blinkenlights, bool, S_IRUGO);
@@ -3487,6 +3492,8 @@ 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 (!skip_extended_resume_delay ||
				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
@@ -305,7 +305,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