linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zeng Tao <prime.zeng@hisilicon.com>
To: <felipe.balbi@linux.intel.com>
Cc: Zeng Tao <prime.zeng@hisilicon.com>,
	Felipe Balbi <balbi@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
Date: Mon, 21 Jan 2019 18:02:56 +0800	[thread overview]
Message-ID: <1548064976-30196-1-git-send-email-prime.zeng@hisilicon.com> (raw)

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) {
-- 
2.7.4


             reply	other threads:[~2019-01-21  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 10:02 Zeng Tao [this message]
2019-01-21  8:16 ` [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint Felipe Balbi
2019-01-21  8:51   ` Zengtao (B)
2019-01-21  8:55     ` Felipe Balbi
2019-02-23  9:26       ` Zengtao (B)
2019-04-25 13:03         ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548064976-30196-1-git-send-email-prime.zeng@hisilicon.com \
    --to=prime.zeng@hisilicon.com \
    --cc=balbi@kernel.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).