On Thu, 18 Feb 2010 mikedunn@xxxxxxxxxxx wrote: > At Thu, 18 Feb 2010 04:42:57 -0800 (PST), you wrote > >Am Donnerstag, 18. Februar 2010 13:38:27 schrieb mikedunn@xxxxxxxxxxx: > >> Should I interpret "intermingled" to mean "out-of-order"? From my Suppose one thread decides to send URBs A, B, C and another thread decides to send URBs X, Y, Z. If they don't coordinate between themselves, any of the following orders is possible: A B C X Y Z X Y Z A B C A X B Y C Z X Y A Z B C and lots of others as well. These aren't out of order since there was no relative order specified between the two threads. But they are intermingled. > >> understanding of the USB standard, I thought a transfer performed by the > >> hardware can be considered atomic, assuming no race conditions in the > >> controlling software. > > >Considering the same endpoint, messages are atomic. But atomic != ordered. > > Can problems occur from unsynchronized messages to different endpoints? Of course they can. Devices can be very finicky about their requirements; if you violate those requirements then a device might do anything. The host won't experience any problems from unsynchronized messages. Only the device will. > My > problem seems to occur when usb_bulk_msg() is called before the callback for a > previous control endpoint message has run. So change your driver to avoid calling usb_bulk_msg() until after the callback for that previous control message. 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