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

Commit 20f03490 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: core: Add support to skip extended bus resume delay"

parents 35b3425f 49ba0d0a
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -48,6 +48,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, S_IRUGO | S_IWUSR);
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 = 0;
module_param(blinkenlights, bool, S_IRUGO);
@@ -3434,7 +3439,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 (!skip_extended_resume_delay)
			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
@@ -3443,7 +3450,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: