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

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

Merge "usb: dwc3: Prevent runtime_suspend after wakeup event"

parents 119b1b3e f0201ec5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2329,6 +2329,13 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool hibernation)
		return -EBUSY;
	}

	if (!mdwc->in_host_mode && (mdwc->vbus_active && !mdwc->suspend)) {
		dev_dbg(mdwc->dev,
			"Received wakeup event before the core suspend\n");
		mutex_unlock(&mdwc->suspend_resume_mutex);
		return -EBUSY;
	}

	ret = dwc3_msm_prepare_suspend(mdwc);
	if (ret) {
		mutex_unlock(&mdwc->suspend_resume_mutex);
+4 −1
Original line number Diff line number Diff line
@@ -3357,8 +3357,11 @@ static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc, bool remote_wakeup)

		/*
		 * In case of remote wake up dwc3_gadget_wakeup_work()
		 * is doing pm_runtime_get_sync().
		 * is doing pm_runtime_get_sync(). But mark last wakeup
		 * event here to prevent runtime_suspend happening before this
		 * wakeup event is processed.
		 */
		pm_runtime_mark_last_busy(dwc->dev);
		dev_dbg(dwc->dev, "Notify OTG from %s\n", __func__);
		dwc->b_suspend = false;
		dwc3_notify_event(dwc,