Commit 1877d6c9 authored by Pratyush Anand's avatar Pratyush Anand Committed by Felipe Balbi

usb: dwc3: gadget: no need to pass params in case of UPDATE_TRANSFER

UPDATE_TRANSFER does not need any parameters. So, no need to prepare it.
Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 915e202a
...@@ -974,13 +974,14 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, ...@@ -974,13 +974,14 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param,
} }
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
params.param0 = upper_32_bits(req->trb_dma);
params.param1 = lower_32_bits(req->trb_dma);
if (start_new) if (start_new) {
params.param0 = upper_32_bits(req->trb_dma);
params.param1 = lower_32_bits(req->trb_dma);
cmd = DWC3_DEPCMD_STARTTRANSFER; cmd = DWC3_DEPCMD_STARTTRANSFER;
else } else {
cmd = DWC3_DEPCMD_UPDATETRANSFER; cmd = DWC3_DEPCMD_UPDATETRANSFER;
}
cmd |= DWC3_DEPCMD_PARAM(cmd_param); cmd |= DWC3_DEPCMD_PARAM(cmd_param);
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params); ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment