UPSTREAM: 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)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:48:36 +0000 (18:48 +0800)
commit5ce894611b6dce13ea5881a99d38fa4251fa20d1
treec5206bedffa77eae91810fe2f9e73150482ee7ab
parent0138d6e4886c3658fcc546bc4f2ccb1328a311c0
UPSTREAM: 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.

Change-Id: I935ca97dfc5f6a97c2aeaef0afab97d7a0324a3a
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>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 51da43b555ba19e0230ff5a5acc58eb0fffb6026)
drivers/usb/dwc2/gadget.c