Hi, On Thu, Nov 03, 2011 at 09:45:17AM +0100, Sebastian Andrzej Siewior wrote: > On 11/02/2011 04:33 PM, Felipe Balbi wrote: > >you're missing one detail, I guess. That break is actually what break us > >out of the loop when req_queued isn't empty. See that we have: > > > >do { > > req = next_request(&dep->req_queued); > > if (!req) > > break; > > > > ... > > > > dwc3_gadget_giveback(dep, req); > > > > ... > > > >} while (true); > > > >Should we change that to: > > > >while (!list_empty(&dep->req_queued) { > >} > > > >to avoid problems ? > > If we change it that way, then we don't enter the loop if the list is > empty and trb.ioc remains not-initialized. > In the early version of this code we cleaned up everything what we have > queued. With the additional handling of IOC for ISOC and short-OUT > packets we actually shouldn't get out here anymore. So what about > adding a WARN_ON() if we get out via the first break? WARN_ON_ONCE() should be fine ;-) -- balbi
Attachment:
signature.asc
Description: Digital signature