summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-01-18 20:18:45 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-06 11:48:31 +0200
commitbb5cfd6811c63c47403e98028bde7e98bd7a1751 (patch)
treeefa8eaf5a8ecc7cfa64807dc282aae9d21c10b5f /drivers/usb/dwc3
parent7b7dd0253cd50fdc413b4ec199f1f3af08b7ba0d (diff)
downloadlinux-stable-bb5cfd6811c63c47403e98028bde7e98bd7a1751.tar.gz
linux-stable-bb5cfd6811c63c47403e98028bde7e98bd7a1751.tar.bz2
linux-stable-bb5cfd6811c63c47403e98028bde7e98bd7a1751.zip
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>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/ep0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 5eb7095e4005..e90ebb9dd3e8 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/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;