hi,

thanks for all the replies.

-i call wait_for_completion() from my read/write entry
points
-in URB's completion handler, call complete()

-when cancellation needed, call usb_unlink_urb()
-the URB's completion handler gets called with err
code on cancellation
-thus, cancellation also uses the same strategy

hope this will work fine..

thanks,
prageeth

--- Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Freitag, 8. August 2003 10:37 schrieb Prageeth:
> > hi all,
> > 
> > in my driver i need to provide synchronous
> read/write
> > operations to the application. moreover, operation
> > cancellation is also needed. 
> > 
> > -what is the most recommended way to wait for
> > completion of an urb?
> 
> Use a struct completion and call complete() on it
> from inside your URB's completion handler.
> 
> > -i was planning to use a modified version of
> > usb_start_wait_urb() used inside usb_bulk_msg()
> 
> That's old and crufty code written before modern
> waiting primitives were available. Please don't copy
> it.
> 
>       HTH
>               Oliver
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to