On Fri, Apr 09, 2004 at 11:24:44AM -0400, Alan Stern wrote: > Greg, what do you think? Should the core have a usb_wait_for_urb() > function that simply blocks until the URB's refcount goes back down to 1?
I don't think it's necessary if a driver uses the usb_alloc_urb() and usb_free_urb() calls, right? That being said: > > The problem is that while there are two distinct API events here, > > usb_unlink_urb() quite properly guarantees only the first one: > > > > - urb unlink, moving the URB off the hardware's queue > > so it finishes early (canceling it) > > > > - urb completion, giving the URB back to the driver. > > Wasn't the whole point of the difference between them that asynchronous > usb_unlink_urb() guarantees only the first one whereas synchronous > usb_unlink_urb() tries to guarantee both? Unfortunately it only _tries_, > it doesn't _guarantee_. That's not ok. Synchronous usb_unlink_urb() really needs to work properly. No "tries", it must. Otherwise drivers have no idea if they can reuse the urb or not. That's not acceptable, and needs to get fixed as soon as possible. So only uhci has this issue, right? Sounds like uhci need to implement the wait_for_urb() call internally to its driver to accomplish the synchronous unlink. thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel