linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb: dwc3: gadget: issue a stop command for ISOC endpoint
@ 2019-01-21 10:02 Zengtao (B)
       [not found] ` <87tvi2juh4.fsf@linux.intel.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Zengtao (B) @ 2019-01-21 10:02 UTC (permalink / raw)
  To: felipe.balbi
  Cc: Zeng Tao, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
	linux-kernel

For ISOC transfers, if there is no available data for a period, we need
to stop the transfer by issue a stop command, otherwise, all the
upcoming transfers will started by update transfer command, and will be
dropped with MISS ISOC errors.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 drivers/usb/dwc3/gadget.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e18c2a2..58e71ba 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2500,6 +2500,10 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
 			stop = true;
 	}
 
+	if (list_empty(&dep->started_list) &&
+	    (usb_endpoint_xfer_isoc(dep->endpoint.desc)))
+		stop = true;
+
 	dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
 
 	if (stop) {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-25 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-21 10:02 usb: dwc3: gadget: issue a stop command for ISOC endpoint Zengtao (B)
     [not found] ` <87tvi2juh4.fsf@linux.intel.com>
     [not found]   ` <678F3D1BB717D949B966B68EAEB446ED24E4CEE3@dggemm526-mbx.china.huawei.com>
     [not found]     ` <87o98ajso9.fsf@linux.intel.com>
2019-02-23  9:26       ` Zengtao (B)
2019-04-25 13:03         ` Felipe Balbi
2019-04-25 13:03           ` [PATCH] " Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).