提交 f5e46aa4 编写于 作者: M Michael Grzeschik 提交者: Felipe Balbi

usb: dwc3: gadget: when the started list is empty stop the active xfer

When we have nothing left to be queued after handling the last trb
we have to stop the current transfer. This way we can ensure that
the next request will be queued with a new and valid timestamp
and will not directly run into an missed xfer.
Reviewed-by: NThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
上级 c5a7092f
......@@ -2738,7 +2738,9 @@ static bool dwc3_gadget_endpoint_trbs_complete(struct dwc3_ep *dep,
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING)
goto out;
if (status == -EXDEV && list_empty(&dep->started_list))
if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
list_empty(&dep->started_list) &&
(list_empty(&dep->pending_list) || status == -EXDEV))
dwc3_stop_active_transfer(dep, true, true);
else if (dwc3_gadget_ep_should_continue(dep))
if (__dwc3_gadget_kick_transfer(dep) == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册