usb: dwc2: gadget: Do not halt endpoint if active
authorVahram Aharonyan <vahrama@synopsys.com>
Tue, 24 May 2016 05:41:57 +0000 (22:41 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 31 May 2016 08:12:56 +0000 (11:12 +0300)
commit51da43b555ba19e0230ff5a5acc58eb0fffb6026
tree7a9f167f9561b925998ee98f348f5b7eb219f84b
parentd246dcb2331c5783743720e6510892eb1d2801d9
usb: dwc2: gadget: Do not halt endpoint if active

The gadget API function usb_ep_set_halt() expects the gadget to return
-EAGAIN if the ep is active. Add support for this behavior.

Otherwise this may break mass storage protocol if a STALL is attempted
on the endpoint.

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