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 <[email protected]>
---
 Chnages 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 b58cd69..89df030 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -666,7 +666,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->endpoint.stream_capable) ||
                        usb_endpoint_xfer_int(desc)) {
                struct dwc3_gadget_ep_cmd_params params;
                struct dwc3_trb *trb;
-- 
2.1.1

Reply via email to