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

Commit 9abb6987 authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: dwc3-msm: Cancel block reset work before turning OFF clocks in suspend



If block reset is in progress and there is a suspend triggered
then suspend will turn off the clocks and this will result in an
unclocked regsiter access during block reset.
Hence to avoid this cancel the block reset work and wait for it to
finish in suspend before turning OFF the clocks.

CRs-fixed: 741254
Change-Id: I0977ec7c5e03e7fa29e382fcc0bdf083cc12cec8
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent c8c517c0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1663,6 +1663,10 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
	atomic_set(&dwc->in_lpm, 1);

	usb_phy_set_suspend(mdwc->hs_phy, 1);

	/* Cancel block reset work and wait for it to finish */
	cancel_work_sync(&mdwc->usb_block_reset_work);

	if (can_suspend_ssphy) {
		usb_phy_set_suspend(mdwc->ss_phy, 1);
		usleep_range(1000, 1200);