On Wed, 8 Feb 2012, Steve Calfee wrote: > Hi Alan, > > I spent a little time looking at the usb sources. Do you know if the > hcd times out control transfers? Where does it do it? It does not. But the higher layers generally do; the typical timeout is on the order of 5 seconds. > Technically it is not required, the host could just continue to be > NAKed forever. Yes. > >> which should be enough for the gadget to get its endpoints ready. > > > > It's true that in normal operation we will not have to worry about > > this race. Nevertheless, drivers should be written to handle even edge > > cases and unlikely races correctly. > > > > Alan Stern > > > I agree we should cover worst case. However determining what that > timing is can be difficult. I have seen some devices that were very > slow at enumeration, so probably all we can say is all devices are > fast enough to enumerate under Windows. So whoever is most impatient, > Linux or Windows will set the longest time we can hold off the host > before completing a control transaction. Coming up with that time is > tricky. For the generic transfers (things like Get-Device-Descriptor and so on), we use the timeout given by the USB spec, which is 5 seconds. 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