From: Pratyush Anand Date: Sun, 3 Jun 2012 14:13:19 +0000 (+0530) Subject: usb: dwc3: Fix break from cleanup request loop X-Git-Tag: v3.6-rc1~101^2~24^2~34^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70b674bfeb735557fc03cdc125ffe6d34218fcfd;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0cab69e..854f3a3 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))