OSDN Git Service

usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable
authorVahram Aharonyan <vahrama@synopsys.com>
Tue, 15 Nov 2016 03:16:53 +0000 (19:16 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:49 +0000 (13:54 +0200)
commita4f827714539a7cb76fa1ac55954b184071999eb
tree17652d4e1c20c46c654d922abb0020bf958c8232
parentae79dd5dddb6fa4051c96c7f14116ded9e0dbdd7
usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

Check if endpoint is enabled during dwc2_hsotg_ep_disable() function
processing and call dwc2_hsotg_ep_stop_xfr() to disable it and flush
associated FIFO.

Move dwc2_hsotg_ep_stop_xfr() and dwc2_hsotg_wait_bit_set() functions
upper before dwc2_hsotg_ep_enable and dwc2_hsotg_ep_disable function
definitions.

Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c