aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/ep0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r--drivers/usb/dwc3/ep0.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index e90ebb9dd3e8..5104dbf46680 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -457,8 +457,11 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
457 case DWC3_ADDRESS_STATE: 457 case DWC3_ADDRESS_STATE:
458 ret = dwc3_ep0_delegate_req(dwc, ctrl); 458 ret = dwc3_ep0_delegate_req(dwc, ctrl);
459 /* if the cfg matches and the cfg is non zero */ 459 /* if the cfg matches and the cfg is non zero */
460 if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS))) 460 if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS))) {
461 dwc->dev_state = DWC3_CONFIGURED_STATE; 461 dwc->dev_state = DWC3_CONFIGURED_STATE;
462 dwc->resize_fifos = true;
463 dev_dbg(dwc->dev, "resize fifos flag SET\n");
464 }
462 break; 465 break;
463 466
464 case DWC3_CONFIGURED_STATE: 467 case DWC3_CONFIGURED_STATE:
@@ -707,6 +710,12 @@ static void dwc3_ep0_do_control_status(struct dwc3 *dwc, u32 epnum)
707{ 710{
708 struct dwc3_ep *dep = dwc->eps[epnum]; 711 struct dwc3_ep *dep = dwc->eps[epnum];
709 712
713 if (dwc->resize_fifos) {
714 dev_dbg(dwc->dev, "starting to resize fifos\n");
715 dwc3_gadget_resize_tx_fifos(dwc);
716 dwc->resize_fifos = 0;
717 }
718
710 WARN_ON(dwc3_ep0_start_control_status(dep)); 719 WARN_ON(dwc3_ep0_start_control_status(dep));
711} 720}
712 721