Re: question: mixing synchronous and asynchronous urb calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Feb 2010 mikedunn@xxxxxxxxxxx wrote:

> Hi all,
> 
> Does the usb subsystem impose any restrictions on mixing asynchronous
> (usb_submit_urb()) and synchronous (usb_bulk_msg(), et. al.) calls?  For
> example, do the callbacks for asynchronously submitted urbs have to complete
> before a synchronous call is made?  Or must locking be implemented to prevent
> a synchronous call from coinciding with an asynchronous call?  I suspect at
> least the latter because usb_bulk_msg() started sometimes returning ETIMEDOUT
> when I stared calling usb_submit_urb() from a tasklet.

The USB subsystem doesn't impose any restrictions of this sort.  In 
fact, at the core level there is no difference between synchronous and 
asynchronous URBs.

However, as Greg pointed out, if two different sets of URBs get
intermingled then it's quite likely they won't do what you want.  The
USB subsystem will send them to the device just fine, but the device
will get confused.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux