Am Dienstag, 22. September 2009 17:19:53 schrieb Alan Stern: > > The same in many ways is true of ASYNCB_INITIALIZED - a valid answer to > > the mid IRQ question of "are we open at the moment" is "yes, no, yes, no, > > yes, no" - so there has to be serialization or it has to be handled in a > > more logical place. > > The real problem here is that the hardware is actually a four-state > system: off, initializing, running, shutting down. Hence a one-bit > flag isn't sufficient to represent all the possible states. OK, I concur we can't do it with a single bit. We at least need a flag for the shutdown state. But do we really need an initializing state? It seems to me that we need to solve the initilization problem with mutual exclusion and no flag can solve the problem. The completion handlers care only about an open or closing adapter as we have no running URBs unless they have been submitted, but drivers use tasklets which need a flag to safely cancel. Regards Oliver -- 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