static inline void urb_begone(struct urb *urb) { while (usb_unlink_urb (urb) == -EBUSY) { set_current_state (TASK_UNINTERRUPTIBLE); schedule_timeout (HZ/100); } }
why not have usb_unlink_urb (sync) do this?
That'd work, and could finally be a good reason for that routine not to be a simple inlined call! I'd thought a bit about that approach.
But if usbcore were to get changed, why not change it to have a usb_urb_begone() call that MUST (eventually) be used for all synchronous unlinks? That's a better long-term approach IMO.
Thing is, I really do think that every device driver using synchronous unlink models should get checked to make sure it's not got other disconnect() bugs lurking; they've been a longstanding problem. And at least some checking would be done as part of making synchronous unlink calls use a different function.
- Dave
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel