usb: pd: Make sure USB host is completed before starting VDMs
In case of DR Swap where USB peripheral is stopped and USB host
is started, the VDM discovery process can lead to DisplayPort
link being brought up without guarantee that starting of USB host
has completed execution. The result is that USB may end up
resetting the combo PHY while DP is already in use. Fix this by
synchronizing after USB host is started before initiating the VDM
exchange.
Additionally, in dwc3-msm.c, replace flush_delayed_work() with
drain_workqueue(), since the stop_peripheral() and start_host()
will end up with back-to-back invocations of the dwc3 sm_work,
so make sure that all are completed before returning from the
blocking sync.
Change-Id: I38264c8d4c5ffaad1f831ffda0677fdc8b41b4d1
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment