From bb5cfd6811c63c47403e98028bde7e98bd7a1751 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Wed, 18 Jan 2012 20:18:45 +0200 Subject: [PATCH] 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 --- drivers/usb/dwc3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 5eb7095..e90ebb9 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; -- 2.7.4