diff options
author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-01-09 12:38:57 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-12 21:33:58 (GMT) |
commit | 1141ea01d5faa82f4910b4a8f896d10490860f24 (patch) | |
tree | 71a4194f02d4d87877e1591a344031ce644bb6ed | |
parent | 5f2196bd7c72cbead9d47da32816dd69a06b692e (diff) | |
download | linux-1141ea01d5faa82f4910b4a8f896d10490860f24.tar.xz |
usb: dwc2: gadget: kill requests after disabling ep
kill_all_requests() can flush the fifo. Call it after disabling the
endpoint.
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index cd8880d..3dda17e 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2605,8 +2605,6 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep) epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); spin_lock_irqsave(&hsotg->lock, flags); - /* 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; @@ -2623,6 +2621,9 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep) /* disable endpoint interrupts */ s3c_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); + /* terminate all requests with shutdown */ + kill_all_requests(hsotg, hs_ep, -ESHUTDOWN); + spin_unlock_irqrestore(&hsotg->lock, flags); return 0; } |