瀏覽代碼

usb: dwc3: ep0: move to CONFIGURED also on delayed status

Mass Storage gadget will take some time to handle
the SetConfiguration request, but even on those
cases we should move to CONFIGURED state.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi 13 年之前
父節點
當前提交
bb5cfd6811
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/dwc3/ep0.c

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

@@ -457,7 +457,7 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
 	case DWC3_ADDRESS_STATE:
 		ret = dwc3_ep0_delegate_req(dwc, ctrl);
 		/* if the cfg matches and the cfg is non zero */
-		if (!ret && cfg)
+		if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS)))
 			dwc->dev_state = DWC3_CONFIGURED_STATE;
 		break;