瀏覽代碼

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>
Felipe Balbi 13 年之前
父節點
當前提交
2dfe37d4a5
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      drivers/usb/dwc3/ep0.c

+ 6 - 1
drivers/usb/dwc3/ep0.c

@@ -262,9 +262,14 @@ out:
 
 
 static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
 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 */
 	/* stall is always issued on EP0 */
+	dep = dwc->eps[0];
 	__dwc3_gadget_ep_set_halt(dep, 1);
 	__dwc3_gadget_ep_set_halt(dep, 1);
 	dep->flags = DWC3_EP_ENABLED;
 	dep->flags = DWC3_EP_ENABLED;
 	dwc->delayed_status = false;
 	dwc->delayed_status = false;