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

Commit 2333d7b9 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 4a568706 81dd67d6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2095,6 +2095,12 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
		return -EBUSY;
	}

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

	ret = dwc3_msm_prepare_suspend(mdwc);
	if (ret)
		return ret;
+4 −1
Original line number Diff line number Diff line
@@ -3189,8 +3189,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,