On Sun, 2008-02-17 at 12:33 -0500, Alan Stern wrote: > On Sun, 17 Feb 2008, Richard Kennedy wrote: > > > Sorry if this a dumb question but I've been trying to figure out how to > > use usb_anchor_urb by looking at usb_skeleton.c. > > > > skel_write calls usb_anchor_urb, but how does usb_unanchor_urb get > > called when the urb is processed successfully? I see it gets called on > > the error path but nowhere else. > > When an URB completes (successfully or unsuccessfully), it > automatically is unanchored. > > > Should skel_write_bulk_callback call usb_unanchor_urb, or does it get > > done automatically by the framework? > > It is done automatically. Look at usb_hcd_giveback_urb() in > drivers/usb/core/hcd.c. > > Alan Stern Alan, Thanks for the pointer. I wonder if it's worth adding a note to the documentation for usb_anchor_urb just to say that they are automatically unlinked on completion ?
Richard - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html