usb: dwc3: ep0: clear all EP0 flags
authorFelipe Balbi <balbi@ti.com>
Tue, 30 Aug 2011 12:54:53 +0000 (15:54 +0300)
committerFelipe Balbi <balbi@ti.com>
Fri, 9 Sep 2011 10:02:16 +0000 (13:02 +0300)
when we're going to issue Set Stall command,
we should clear DWC3_EP_STALL flag, but also
we should clear BUSY, HALTED and all others.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/ep0.c

index 6745d145775d038682cb9840b1a33af4a77f8e79..618a29e113230b517a0a09691f0d85221017385a 100644 (file)
@@ -216,7 +216,7 @@ static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
 {
        /* stall is always issued on EP0 */
        __dwc3_gadget_ep_set_halt(dwc->eps[0], 1);
-       dwc->eps[0]->flags &= ~DWC3_EP_STALL;
+       dwc->eps[0]->flags = DWC3_EP_ENABLED;
        dwc->ep0state = EP0_SETUP_PHASE;
        dwc3_ep0_out_start(dwc);
 }