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

Commit 980a25b5 authored by Elson Roy Serrao's avatar Elson Roy Serrao
Browse files

usb: dwc3: Dont release wakeup source during usb restart



When changing USB speed via sysfs, the device might utilize the
idle time between DISCONNECT and CONNECT events and enter suspend.
As a result the pending CONNECT might get delayed thus pushing USB
enumeration during the next resume. Avoid this by not releasing the
wakeup source when usb restart is in progress.

Change-Id: I754b76eb7b36923a2dcd4d58587101750d1cd83c
Signed-off-by: default avatarElson Roy Serrao <eserrao@codeaurora.org>
parent c4e2bcf6
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -3374,6 +3374,7 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool force_power_collapse,

	dwc3_msm_update_bus_bw(mdwc, BUS_VOTE_NONE);

	if (!mdwc->in_restart) {
		/*
		 * release wakeup source with timeout to defer system suspend to
		 * handle case where on USB cable disconnect, SUSPEND and DISCONNECT
@@ -3386,6 +3387,7 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool force_power_collapse,
		} else {
			pm_relax(mdwc->dev);
		}
	}

	atomic_set(&dwc->in_lpm, 1);