mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
UPSTREAM: usb: dwc2: gadget: free TX FIFO after killing requests
As kill_all_requests() potentially flushes TX FIFO, we should should
free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
Change-Id: I90e2add8abbc598f82856576ed222c7429b77b6b
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1c07b20eaa)
This commit is contained in:
committed by
Tao Huang
parent
888093f2db
commit
f773c373bc
@@ -3120,10 +3120,6 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
|
||||
|
||||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
|
||||
hsotg->fifo_map &= ~(1<<hs_ep->fifo_index);
|
||||
hs_ep->fifo_index = 0;
|
||||
hs_ep->fifo_size = 0;
|
||||
|
||||
ctrl = dwc2_readl(hsotg->regs + epctrl_reg);
|
||||
ctrl &= ~DXEPCTL_EPENA;
|
||||
ctrl &= ~DXEPCTL_USBACTEP;
|
||||
@@ -3138,6 +3134,10 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
|
||||
/* terminate all requests with shutdown */
|
||||
kill_all_requests(hsotg, hs_ep, -ESHUTDOWN);
|
||||
|
||||
hsotg->fifo_map &= ~(1 << hs_ep->fifo_index);
|
||||
hs_ep->fifo_index = 0;
|
||||
hs_ep->fifo_size = 0;
|
||||
|
||||
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user