On Fri, 30 Apr 2004, David Brownell wrote: > Wouldn't better semantics be "kill and bury" ... that is, > even dropping the reference? An urb that's "killed" would > not ever be re-used ... simpler. Completion handlers would > just kill the urb, so would close(). Open() would allocate > the urbs. > > usb_kill_urb(mystate->urb); > mystate->urb = 0; > > As folk have noted, the primary use of this would be in > disconnect() routines, or maybe close(), where re-use is > not an issue ... so there's no need to making that new > routine address the re-use case.
I would prefer not to do that. A lot of drivers follow the example of usb-skeleton, where all the URBs are allocated during probe() and not during open(). Also, to make the transition as easy as possible, usb_kill_urb() shouldn't do much more than synchronous usb_unlink_urb(). Finally, it's not hard for a driver to call usb_kill_urb() and then call usb_free_urb(). Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
