On Tue, Aug 07, 2012 at 06:09:10PM +0530, Pratyush Anand wrote: > On 8/7/2012 5:54 PM, Felipe Balbi wrote: > >Hi, > > > >On Tue, Aug 07, 2012 at 04:54:18PM +0530, Pratyush Anand wrote: > >>When MISSED_ISOC is set, BUSY is also set. Since, we are handling > >>MISSED_ISOC as a separate case in third scenario, therefore handle only > >>BUSY but not MISSED_ISOC in second scenario. > >> > >>Signed-off-by: Pratyush Anand <pratyush.anand@xxxxxx> > >>--- > >> drivers/usb/dwc3/gadget.c | 3 ++- > >> 1 files changed, 2 insertions(+), 1 deletions(-) > >> > >>diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > >>index 0ead4cd..800944f 100644 > >>--- a/drivers/usb/dwc3/gadget.c > >>+++ b/drivers/usb/dwc3/gadget.c > >>@@ -1139,7 +1139,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) > >> * core may not see the modified TRB(s). > >> */ > >> if (usb_endpoint_xfer_isoc(dep->endpoint.desc) && > >>- (dep->flags & DWC3_EP_BUSY)) { > >>+ (dep->flags & DWC3_EP_BUSY) && > >>+ !(dep->flags & DWC3_EP_MISSED_ISOC)) { > > > >what about inverting the cases then ? Moving missed_isoc before ep_busy? > >Would that work ? I would be more comfortable with that, I guess. > > > > Probably not. Even then (with inverted) case 2 (ie missed isoc) and > case 3 (ie ep busy) will be true, and both if loop will be executed. > > If we keep 3rd case in else part of 2nd case, then we do not need to > check an extra flag in second case. Let me know, it this is ok with > you. aaa, indeed. I guess I'll apply this patch as is. For some reason I thought we had return statements inside each if block. Oh well, getting old I guess :-p -- balbi
Attachment:
signature.asc
Description: Digital signature