Commit b6842d49 authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Felipe Balbi

usb: dwc3: gadget: Check for in-progress END_TRANSFER

While handling TRBs completion, if a END_TRANSFER command isn't
completed, don't kick new transfer or issue END_TRANSFER command.
Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 27b31b91
...@@ -2675,11 +2675,15 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep, ...@@ -2675,11 +2675,15 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
dwc3_gadget_ep_cleanup_completed_requests(dep, event, status); dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING)
goto out;
if (stop) if (stop)
dwc3_stop_active_transfer(dep, true, true); dwc3_stop_active_transfer(dep, true, true);
else if (dwc3_gadget_ep_should_continue(dep)) else if (dwc3_gadget_ep_should_continue(dep))
__dwc3_gadget_kick_transfer(dep); __dwc3_gadget_kick_transfer(dep);
out:
/* /*
* WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround. * WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround.
* See dwc3_gadget_linksts_change_interrupt() for 1st half. * See dwc3_gadget_linksts_change_interrupt() for 1st half.
......
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