On Mon, Dec 30, 2013 at 11:46:13AM -0600, Bin Liu wrote: > Hi, > > I have a case in which the class layer has tx and rx urbs in sequence, What "class layer"? > and the class layer expects the rx complete() should be called after > the tx complete() is called. What driver expects this? Sounds like a bug in the driver. > But due to scheduling, I guess, sometimes the tx complete() is called > after rx_complete(), which confuses the class layer. > > So normal case is > - 1. submit tx/OUT urb; > - 2. submit rx/IN urb; > - 3. the device received the tx/OUT packet; > - 4. the device sent rx/IN packet; > - 5. tx complete() is called; > - 6. rx complete() is called; > > But in failure case, step 5 & 6 are swapped. That's not a "failure", it's a "bug in the driver to assume something like this would happen". > Is this considered as a bug in the host controller driver, which > should guarantee the order of the sequence? Or it is a bug in the > class layer, which should not rely on the behavior in core and host > controller drivers? Again, what do you mean by "class layer"? thanks, greg k-h -- 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