linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v7,06/10] usb: dwc3: don't issue no-op trb for stream capable endpoints
@ 2018-12-01 11:13 Anurag Kumar Vulisha
  0 siblings, 0 replies; only message in thread
From: Anurag Kumar Vulisha @ 2018-12-01 11:13 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Shuah Khan, Alan Stern,
	Johan Hovold, Jaejoong Kim, Benjamin Herrenschmidt,
	Roger Quadros, Manu Gautam, martin.petersen, Bart Van Assche,
	Mike Christie, Matthew Wilcox, Colin Ian King
  Cc: linux-usb, linux-kernel, v.anuragkumar, Thinh Nguyen,
	Tejas Joglekar, Ajay Yugalkishore Pandey, Anurag Kumar Vulisha

The stream capable endpoints require stream id to be given
when issuing START TRANSFER. While issuing no-op trb the
stream id is not yet known, so don't issue no-op trb's on
stream capable endpoints.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
---
 Changes in v7:
	1. Reverted to dep->stream_capable from dep->endpoint.stream_capable

 Changes in v6:
	1. Replaced dep->stream_capable with dep->endpoint.stream_capable

 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 3edfc0b..78c9bc6 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -673,7 +673,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action)
 	 * Issue StartTransfer here with no-op TRB so we can always rely on No
 	 * Response Update Transfer command.
 	 */
-	if (usb_endpoint_xfer_bulk(desc) ||
+	if ((usb_endpoint_xfer_bulk(desc) && !dep->stream_capable) ||
 			usb_endpoint_xfer_int(desc)) {
 		struct dwc3_gadget_ep_cmd_params params;
 		struct dwc3_trb	*trb;

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

only message in thread, other threads:[~2018-12-01 11:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 11:13 [v7,06/10] usb: dwc3: don't issue no-op trb 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).