summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorPratyush Anand <pratyush.anand@st.com>2012-06-03 19:43:19 +0530
committerFelipe Balbi <balbi@ti.com>2012-06-04 18:23:19 +0300
commit70b674bfeb735557fc03cdc125ffe6d34218fcfd (patch)
treea8a99009368df2cd6e9297857edf94d9bfa3a82c /drivers/usb/dwc3
parentd6d6ec7b8854ab62f7f3907656d5d29eb47532e7 (diff)
downloadlinux-70b674bfeb735557fc03cdc125ffe6d34218fcfd.tar.bz2
usb: dwc3: Fix break from cleanup request loop
If event status says that its last completed TRB but TRB is still owned by HW then break from the loop, because we are not going to get correct TRB status from trb control/size register. Signed-off-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 0cab69e51380..854f3a3c8832 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1681,7 +1681,8 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
if (s_pkt)
break;
if ((event->status & DEPEVT_STATUS_LST) &&
- (trb->ctrl & DWC3_TRB_CTRL_LST))
+ (trb->ctrl & (DWC3_TRB_CTRL_LST |
+ DWC3_TRB_CTRL_HWO)))
break;
if ((event->status & DEPEVT_STATUS_IOC) &&
(trb->ctrl & DWC3_TRB_CTRL_IOC))