Hi Pete,

> > Perhaps you need to have two flags, for freeing unconditionally
> > and on condition of no errors having happened.
> > If you free unconditionally handling errors, eg. clearing a stall becomes
> > hard.
> 
> This assertion makes no sense to me. URBs are not "freed" or "put" by
> magic by the core when your completion handler returns, thank heavens!
> Your own completion handler calls usb_free_urb, when the status is known.
> So, if you need to retry the URB, don't free it.

I agree. If the reference count of the URB goes down and the release
function gets called, the URB is not longer valid. Same applies to the
assigned buffer. It is of no use anymore.

Regards

Marcel



-------------------------------------------------------------------------
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

Reply via email to