That function is unnecessarily called from
dwc3_gadget_reset_interrupt(). Gadget drivers (and
thus, functions) are required to dequeue all pending
requests when they get notified about a USB Bus
Reset.
Trying to make sure there are no pending requests
only serves the purpose of working around possibly
bad gadgets.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
                udelay(100);
 }
 
-static void dwc3_stop_active_transfers(struct dwc3 *dwc)
-{
-       u32 epnum;
-
-       for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) {
-               struct dwc3_ep *dep;
-
-               dep = dwc->eps[epnum];
-               if (!dep)
-                       continue;
-
-               if (!(dep->flags & DWC3_EP_ENABLED))
-                       continue;
-
-               dwc3_remove_requests(dwc, dep);
-       }
-}
-
 static void dwc3_clear_stall_all_ep(struct dwc3 *dwc)
 {
        u32 epnum;
        reg &= ~DWC3_DCTL_TSTCTRL_MASK;
        dwc3_writel(dwc->regs, DWC3_DCTL, reg);
        dwc->test_mode = false;
-
-       dwc3_stop_active_transfers(dwc);
        dwc3_clear_stall_all_ep(dwc);
 
        /* Reset device address to zero */