On Tue, 9 Jun 2009, Naveen@moschip wrote: > Hi All, > > I am going through the linux ( 2.6.27 ) ehci driver code for understanding > the scheduling of various transfers especially split transactions. > > Is there any good documentation on the software calculations for usecs, > c_usecs, gap_uf, tt_usecs. There are some comments for some of these > parameters but some calculations are very difficult to understand. There is excellent documentation in the USB 2.0 specification, available from www.usb.org. However the formulas in Chapter 5 aren't fully explained (and they aren't fully correct, either). > Also I observed in ehci-sched.c:: iso_stream_init( ) function, the > stream->usecs for full/low speed devices is calculated based on High speed > device parameters instead of full/low speed using usb_calc_bus_time() > function. > Is there any special purpose for calculating like this ? > > ##### Line 294 #### > stream->usecs = HS_USECS_ISO (maxp); > think_time = dev->tt ? dev->tt->think_time : 0; > ##### The stream->usecs value refers to time used on the high-speed bus, not the full/low-speed bus. However, you should bear in mind that a fair amount of the code in ehci-sched.c is buggy or outright wrong. There are plans to fix it but this will take a while. 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