usb: dwc3: gadget: update transfer needs transfer resource
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 30 May 2016 10:29:35 +0000 (13:29 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:49 +0000 (12:32 +0300)
According to SNPS databook, we need to pass transfer
resource on update transfer command, let's do it.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c

index 61edb6650e2f3dd75b6d9701319f53e15a3bc5de..e7e493b4508416971439bf66d5fd1fc5a478a1fb 100644 (file)
@@ -994,12 +994,13 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param)
        if (starting) {
                params.param0 = upper_32_bits(req->trb_dma);
                params.param1 = lower_32_bits(req->trb_dma);
-               cmd = DWC3_DEPCMD_STARTTRANSFER;
+               cmd = DWC3_DEPCMD_STARTTRANSFER |
+                       DWC3_DEPCMD_PARAM(cmd_param);
        } else {
-               cmd = DWC3_DEPCMD_UPDATETRANSFER;
+               cmd = DWC3_DEPCMD_UPDATETRANSFER |
+                       DWC3_DEPCMD_PARAM(dep->resource_index);
        }
 
-       cmd |= DWC3_DEPCMD_PARAM(cmd_param);
        ret = dwc3_send_gadget_ep_cmd(dep, cmd, &params);
        if (ret < 0) {
                /*