summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-07-23 06:07:41 (GMT)
committerFelipe Balbi <balbi@ti.com>2012-08-03 06:28:28 (GMT)
commit2dfe37d4a5f9a7586a7ff79249492fb8280afb6f (patch)
tree1eb55299f5393b6c528205fa8c818d13727ecbd2 /drivers/usb/dwc3
parent7125d584d20ba7624488ddefa84b17ea6ce558f1 (diff)
downloadlinux-2dfe37d4a5f9a7586a7ff79249492fb8280afb6f.tar.xz
usb: dwc3: ep0: make sure to reinitilize ep1 on STALL
When issuing SetStall on ep0, we must make sure to reinitialize all flags on physical ep1 too. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/ep0.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 3f2c698..1bba97b 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -262,9 +262,14 @@ out:
static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
{
- struct dwc3_ep *dep = dwc->eps[0];
+ struct dwc3_ep *dep;
+
+ /* reinitialize physical ep1 */
+ dep = dwc->eps[1];
+ dep->flags = DWC3_EP_ENABLED;
/* stall is always issued on EP0 */
+ dep = dwc->eps[0];
__dwc3_gadget_ep_set_halt(dep, 1);
dep->flags = DWC3_EP_ENABLED;
dwc->delayed_status = false;