[linux-usb-devel] synchronous ops with urbs

2003-08-14 Thread 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? -i was planning to use a modified version of usb_start_wait_urb() used inside usb_bulk

Re: [linux-usb-devel] synchronous ops with urbs

2003-08-14 Thread David Brownell
David Brownell wrote: There's another wait/synchronize primitive that I found at one point, I think the block layer used it, which involved a bit less inlined code and didn't necessarily require everything to be interruptible. I lost track of it though. Found it again, also in : prepare_to_wait

Re: [linux-usb-devel] synchronous ops with urbs

2003-08-14 Thread David Brownell
Prageeth wrote: 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? Submit using usb_submit_urb(), then if you don't need operation cancel

Re: [linux-usb-devel] synchronous ops with urbs

2003-08-11 Thread Prageeth
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 s

Re: [linux-usb-devel] synchronous ops with urbs

2003-08-08 Thread Oliver Neukum
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 compl