On Tue, 28 Jan 2003, David Brownell wrote: > Oliver Neukum wrote: > >>>-EBUSY: usb_retire_urb would wait until the completion handler has > >>>finished; > >> > >>Completely impossible for asynchronous unlinks. They don't wait. > >>And not necessary for drivers that are already written so they > >>can shut down correctly. > > > > > > Whether we should do this for an asynchronous unlink is questionable, > > but why would it be impossible? We could spin. > > Not always. Suppose the async unlink is being done with IRQs blocked, > on a single CPU system ... when could the unlink ever complete?
Even worse is the fact that -EBUSY has a dual meaning: along with indicating that the urb has already started to finish up, it also can mean that the urb was not active in the first place -- i.e., had already completed by the time usb_unlink_urb was called, or had never been submitted at all. Waiting for a completion handler under those circumstances would be a disaster. Alan Stern ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel