usb: dwc3: don't issue no-op trb for stream capable endpoints
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Sat, 1 Dec 2018 11:13:27 +0000 (16:43 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 5 Dec 2018 08:44:35 +0000 (10:44 +0200)
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>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c

index d54d434dc986747edc77466d93afc86405aa8212..08dea6fdb4a85ae97a20cbddd66cc59241b47bfa 100644 (file)
@@ -670,7 +670,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;