@@ -91,6 +91,11 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
{
struct dwc3 *dwc = dep->dwc;
+ if (WARN(req->status < DWC3_REQUEST_STATUS_COMPLETED,
+ "%s: request %pK already in flight\n",
+ dep->name, &req->request))
+ return -EINVAL;
+
req->request.actual = 0;
req->request.status = -EINPROGRESS;
req->epnum = dep->number;
@@ -3002,6 +3002,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)
dwc->ep0_bounced = false;
dwc->link_state = DWC3_LINK_STATE_SS_DIS;
dwc->delayed_status = false;
+ dwc->ep0_usb_req.status = DWC3_REQUEST_STATUS_UNKNOWN;
dwc3_ep0_out_start(dwc);
dwc3_gadget_enable_irq(dwc);