usb: dwc3: Ensure blocking_sync waits until host mode starts or stops
Currently flushwork and drain_workqueue of resume work and sm_work
queue is taking care of blocking until host mode starts or stops.
Flush work only flushes the work which is currently being executed,
it cannot be guaranteed that entire dwc3_wq will be flushed by
flush_work, so when sm_work_queue is being drained there is still
a chance that resume_work queues work to sm_work_queue which is not
allowed and leads to dr swap failure.
So based on the event from policy engine whether it is start host or
stop host ensure that blocking sync blocks until the event is
completely executed.
Change-Id: Ice5f5e8e2a39fc444cdec63475a737a44be48619
Signed-off-by:
Rohith Kollalsi <rkollals@codeaurora.org>
Loading
Please register or sign in to comment