diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-10-14 13:46:50 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-03 11:38:35 +0300 |
commit | cf68923055cbb3a2d6a819a7197e4f69bf68cc44 (patch) | |
tree | 4da0a9c3d04c70ac2181491c783f1e2a18a03c63 /drivers | |
parent | c5ac6116db35db0d750216b3ac5e1db1e2bd59c2 (diff) | |
download | linux-cf68923055cbb3a2d6a819a7197e4f69bf68cc44.tar.xz |
usb: dwc3: gadget: purge dwc3_stop_active_transfers()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index bcd0d32ed4e9..daebc089635b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2302,24 +2302,6 @@ static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum, bool force) 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; @@ -2405,8 +2387,6 @@ static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc) 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 */ |