Hi,

1.
does anybody have any experience with async usb transfers? When I say asynchronous transfers I refer to non-blocking (write/read/ioctl) calls the user thread can test or wait for their completion.


In the write/read/ioctl it is no problem to pass an urb down asynchronously. But how do I test/wait for its success? If nobody has a better idea, I would do that in ioctl with a special ioctl-code for testing/waiting.

Have the urb's completion callback set some flag (it'll be done in_interrupt, so lock appropriately); that's enough for the "test" part.

If you use a "struct completion" then then have the callback
issue complete(), then you can wait using wait_for_completion(),
or maybe wait_event_interrupible(), and test with appropriate
locking (the lock on the wait queue head inside that struct).


2.
Does the host-controller driver queue urbs? Or do I have to wait for the completion of an urb before I can pass the next one down?

It queues bulk, though for UHCI you'll need to use USB_QUEUE_BULK in urb->transfer_flags. It also queues ISO.

On 2.5, all transfer types are transparently queued.

- Dave


Thanx,
Jan





-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to