aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/ep0.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 2f51de57593a..74a3828cf950 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -149,20 +149,14 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
149 149
150 direction = !!(dep->flags & DWC3_EP0_DIR_IN); 150 direction = !!(dep->flags & DWC3_EP0_DIR_IN);
151 151
152 if (dwc->ep0state == EP0_STATUS_PHASE) { 152 if (dwc->ep0state != EP0_DATA_PHASE) {
153 type = dwc->three_stage_setup 153 dev_WARN(dwc->dev, "Unexpected pending request\n");
154 ? DWC3_TRBCTL_CONTROL_STATUS3
155 : DWC3_TRBCTL_CONTROL_STATUS2;
156 } else if (dwc->ep0state == EP0_DATA_PHASE) {
157 type = DWC3_TRBCTL_CONTROL_DATA;
158 } else {
159 /* should never happen */
160 WARN_ON(1);
161 return 0; 154 return 0;
162 } 155 }
163 156
164 ret = dwc3_ep0_start_trans(dwc, direction, 157 ret = dwc3_ep0_start_trans(dwc, direction,
165 req->request.dma, req->request.length, type); 158 req->request.dma, req->request.length,
159 DWC3_TRBCTL_CONTROL_DATA);
166 dep->flags &= ~(DWC3_EP_PENDING_REQUEST | 160 dep->flags &= ~(DWC3_EP_PENDING_REQUEST |
167 DWC3_EP0_DIR_IN); 161 DWC3_EP0_DIR_IN);
168 } else if (dwc->delayed_status) { 162 } else if (dwc->delayed_status) {