Am Sonntag, 10. Juni 2007 schrieb Alan Stern: > On Sun, 10 Jun 2007, Oliver Neukum wrote: > > > Am Sonntag, 10. Juni 2007 schrieb Greg KH: > > > > Yes, it could be done that way, I think. It'll take more work than a > > > > simple search-and-replace. The trickiest part is how to unlink an URB > > > > after it has been submitted but before it has been handed to the HCD... > > > > > > We allow that today? How, multiple threads doing the submit and then > > > unlink call? That's looney. We should not worry about that until after > > > > Isn't that exactly what a resubmission in the completion handler is? > > No. It may be similar in some vague sense but it's not the same thing > at all. What Greg and I are talking about is this: > > CPU 0 CPU 1 > ----- ----- > call usb_submit_urb > call usb_unlink_urb > call hcd->driver->urb_enqueue > > What you're talking about is this: > > CPU 0 > ----- > call usb_hcd_giveback_urb > call urb->complete > call usb_submit_urb > > It doesn't involve multiple threads or unlinking.
But suppose you want to unlink an URB that is resubmitted in its completion handler. I see no way to avoid hitting that window. Unless you want to force drivers to use synchronization. At least usb_kill_urb() has to always work. Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel