diff options
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 48d3770bd765..4cc72fdc0575 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -214,9 +214,19 @@ out: | |||
214 | 214 | ||
215 | static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc) | 215 | static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc) |
216 | { | 216 | { |
217 | struct dwc3_ep *dep = dwc->eps[0]; | ||
218 | |||
217 | /* stall is always issued on EP0 */ | 219 | /* stall is always issued on EP0 */ |
218 | __dwc3_gadget_ep_set_halt(dwc->eps[0], 1); | 220 | __dwc3_gadget_ep_set_halt(dwc->eps[0], 1); |
219 | dwc->eps[0]->flags = DWC3_EP_ENABLED; | 221 | dwc->eps[0]->flags = DWC3_EP_ENABLED; |
222 | |||
223 | if (!list_empty(&dep->request_list)) { | ||
224 | struct dwc3_request *req; | ||
225 | |||
226 | req = next_request(&dep->request_list); | ||
227 | dwc3_gadget_giveback(dep, req, -ECONNRESET); | ||
228 | } | ||
229 | |||
220 | dwc->ep0state = EP0_SETUP_PHASE; | 230 | dwc->ep0state = EP0_SETUP_PHASE; |
221 | dwc3_ep0_out_start(dwc); | 231 | dwc3_ep0_out_start(dwc); |
222 | } | 232 | } |