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

-
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

Reply via email to