Skip to content
Commit bb014736 authored by Baolin Wang's avatar Baolin Wang Committed by Felipe Balbi
Browse files

usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do so



When we change the USB function with configfs dynamically, we possibly
met this situation: one core is doing the control transfer, another core
is trying to unregister the USB gadget from userspace, we must wait for
completing this control tranfer, or it will hang the controller to set
the DEVCTRLHLT flag.

[ felipe.balbi@linux.intel.com: several fixes to the patch
	- call complete() before starting following SETUP transfer
	- add a macro for ep0_in_setup's timeout
	- change commit subject slightly
	- break lines at 72 characters (git adds an 8-character tab)
	- avoid changes to dwc3_gadget_run_stop() ]

Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent cf689230
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment