usb: dwc3: ep0: move to CONFIGURED also on delayed status
authorFelipe Balbi <balbi@ti.com>
Wed, 18 Jan 2012 18:18:45 +0000 (20:18 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 6 Feb 2012 09:48:31 +0000 (11:48 +0200)
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>
drivers/usb/dwc3/ep0.c

index 5eb7095e4005358802bf3e8bd84436bf1a210921..e90ebb9dd3e87f1905dd5b8f482b4f589826aa99 100644 (file)
@@ -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;