From: Quanyang Wang <quanyang.w...@windriver.com>

The cmd_endtransfer has been move to a new function
__dwc3_stop_active_transfer in the commit 1536e51c30ada ("usb: dwc3:
gadget: move cmd_endtransfer to extra function"), but it is brought back
by merging. So delete it to fix compile error.

Signed-off-by: Quanyang Wang <quanyang.w...@windriver.com>
---
Hi Bruce,
Would you please help merge this patch to the branches:
        v5.15/standard/preempt-rt/sdkv5.15/xlnx-soc
        v5.15/standard/sdkv5.15/xlnx-soc
Thanks,
Quanyang
---
 drivers/usb/dwc3/gadget.c | 38 +++++++++++---------------------------
 1 file changed, 11 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 9e9133ac9ab9b..79ea40f69db70 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3767,6 +3767,17 @@ void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool 
force, bool interrupt)
            (dep->flags & DWC3_EP_END_TRANSFER_PENDING))
                return;
 
+       if (!interrupt)
+               dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
+       else
+               dep->flags |= DWC3_EP_END_TRANSFER_PENDING;
+       /*
+        * when transfer is stopped with force rm bit false, it can be
+        * restarted by passing resource_index in params; don't loose it
+        */
+       if (force)
+               dep->resource_index = 0;
+
        /*
         * NOTICE: We are violating what the Databook says about the
         * EndTransfer command. Ideally we would _always_ wait for the
@@ -3797,33 +3808,6 @@ void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool 
force, bool interrupt)
         * controller to handle the command completely before DWC3
         * remove requests attempts to unmap USB request buffers.
         */
-
-       cmd = DWC3_DEPCMD_ENDTRANSFER;
-       cmd |= force ? DWC3_DEPCMD_HIPRI_FORCERM : 0;
-       cmd |= interrupt ? DWC3_DEPCMD_CMDIOC : 0;
-       cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
-       memset(&params, 0, sizeof(params));
-       ret = dwc3_send_gadget_ep_cmd(dep, cmd, &params);
-       WARN_ON_ONCE(ret);
-
-       /*
-        * when transfer is stopped with force rm bit false, it can be
-        * restarted by passing resource_index in params; don't loose it
-        */
-       if (force)
-               dep->resource_index = 0;
-
-       if (!interrupt)
-               dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
-       else
-               dep->flags |= DWC3_EP_END_TRANSFER_PENDING;
-       /*
-        * when transfer is stopped with force rm bit false, it can be
-        * restarted by passing resource_index in params; don't loose it
-        */
-       if (force)
-               dep->resource_index = 0;
-
        __dwc3_stop_active_transfer(dep, force, interrupt);
 }
 
-- 
2.36.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12353): 
https://lists.yoctoproject.org/g/linux-yocto/message/12353
Mute This Topic: https://lists.yoctoproject.org/mt/98119766/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to