Commit 89185916 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: clear DWC3_PENDING_REQUEST when request is queued

Instead of clearing DWC3_PENDING_REQUEST when
we start transfer, let's do it when the request
is actually queued, that way we know for sure
that we're clearing in the right time.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 1d6a3918
...@@ -948,7 +948,6 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, ...@@ -948,7 +948,6 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param,
dwc3_trace(trace_dwc3_gadget, "%s: endpoint busy", dep->name); dwc3_trace(trace_dwc3_gadget, "%s: endpoint busy", dep->name);
return -EBUSY; return -EBUSY;
} }
dep->flags &= ~DWC3_EP_PENDING_REQUEST;
/* /*
* If we are getting here after a short-out-packet we don't enqueue any * If we are getting here after a short-out-packet we don't enqueue any
...@@ -1117,6 +1116,10 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) ...@@ -1117,6 +1116,10 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
if (ret && ret != -EBUSY) if (ret && ret != -EBUSY)
dev_dbg(dwc->dev, "%s: failed to kick transfers\n", dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
dep->name); dep->name);
if (!ret)
dep->flags &= ~DWC3_EP_PENDING_REQUEST;
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment