From: Felipe Balbi Date: Tue, 30 Aug 2011 12:54:53 +0000 (+0300) Subject: usb: dwc3: ep0: clear all EP0 flags X-Git-Tag: firefly_0821_release~3680^2~4327^2~148^2~27 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=76cb323f80ac32833109e2c089842be2b99d8d2b;p=firefly-linux-kernel-4.4.55.git usb: dwc3: ep0: clear all EP0 flags 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 --- diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 6745d145775d..618a29e11323 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -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); }