USB: dwc3-msm: clear in_restart flag always in restart work
Currenlty driver is clearing mdwc->inrestart flag only if vbus_active is high only after making sure USB entered low power mode. There is a chance cable is disconnected during execution of restart work and endup not clearing mdwc->in_restart flag if disconnect happens. Hence fix this by clearing mdwc->in_restart flag always irrespective of vbus_active set or cleared. Change-Id: I15fa1893c798946c7514bf8cb23773b5784e671e Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
parent
bee274711e
commit
e0a3a8b537
1 changed files with 2 additions and 3 deletions
|
@ -1465,11 +1465,10 @@ static void dwc3_restart_usb_work(struct work_struct *w)
|
||||||
pm_runtime_suspend(mdwc->dev);
|
pm_runtime_suspend(mdwc->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mdwc->in_restart = false;
|
||||||
/* Force reconnect only if cable is still connected */
|
/* Force reconnect only if cable is still connected */
|
||||||
if (mdwc->vbus_active) {
|
if (mdwc->vbus_active)
|
||||||
mdwc->in_restart = false;
|
|
||||||
dwc3_resume_work(&mdwc->resume_work);
|
dwc3_resume_work(&mdwc->resume_work);
|
||||||
}
|
|
||||||
|
|
||||||
dwc->err_evt_seen = false;
|
dwc->err_evt_seen = false;
|
||||||
flush_delayed_work(&mdwc->sm_work);
|
flush_delayed_work(&mdwc->sm_work);
|
||||||
|
|
Loading…
Add table
Reference in a new issue