linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [V6,07/10] usb: dwc3: check for requests in started list for stream capable endpoints
@ 2018-10-13 13:14 Anurag Kumar Vulisha
  0 siblings, 0 replies; only message in thread
From: Anurag Kumar Vulisha @ 2018-10-13 13:14 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Alan Stern, Johan Hovold,
	Jaejoong Kim, Benjamin Herrenschmidt, Roger Quadros
  Cc: linux-usb, linux-kernel, v.anuragkumar, Thinh Nguyen,
	Tejas Joglekar, Ajay Yugalkishore Pandey, Anurag Kumar Vulisha

For stream capable endpoints, uas layer can queue mulpile requests on
single ep with different stream ids. So, there can be multiple pending
requests waiting to be transferred. This patch changes the code to check
for any pending requests waiting to be transferred on ep started_list and
calls __dwc3_gadget_kick_transfer() if any.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
---
 Changes in v6:
	1. Replaced dep->stream_capable with dep->endpoint.stream_caapable

 Changes in v5:
	1. None

 Changes in v4:
	1. None

 Changes in v3:
	1. None

 Changes in v2:
	1. None
---
 drivers/usb/dwc3/gadget.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 89df030..9bf1688 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2420,6 +2420,9 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
 
 	dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
 
+	if (dep->endpoint.stream_capable && !list_empty(&dep->started_list))
+		__dwc3_gadget_kick_transfer(dep);
+
 	if (stop) {
 		dwc3_stop_active_transfer(dep, true);
 		dep->flags = DWC3_EP_ENABLED;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-13 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13 13:14 [V6,07/10] usb: dwc3: check for requests in started list for stream capable endpoints Anurag Kumar Vulisha

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).