2006/3/26, Alan Stern <[EMAIL PROTECTED]>: > On Sun, 26 Mar 2006, Franck Bui-Huu wrote: > > > I got 2 more questions, hope you don't mind. > > > > Can I assert that the ep0's request queue has always one request queued ? > > No, of course not. Most of the time there won't be any requests queued. > On ep0, requests are queued only in response to Setup packets from the > host. >
sorry the question wasn't accurate, I would have asked: am I sure that the driver will queue only one request in a response to a SETUP packet ? that would mean the request queue for ep0 has no more than one request at any time. > > Is it safe when aborting all requests of an ep's queue to do > > > > while (queue is not empty) { > > request = first request of the queue > > remove_request_from_queue(request); > > driver->complete(request, status = -ERROR); > > } > > > > I mean, am I sure that the driver won't queue another request to the queue ? > > No, you can't be sure of that. But if the gadget driver does queue > another request, it has to take the consequences. In these circumstances > it's not defined whether the new request would also get aborted. > does that mean there is no safe way to nuke all requests which belong to an ep's queue ? thanks -- Franck ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel