On Mon, 1 Aug 2011, loody wrote: > hi: > > 2011/8/1 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > > On Mon, 1 Aug 2011, loody wrote: > > > >> sorry for picking this old thread, since the subject is the same. > >> my question is: > >> In high speed device and an urb->inerval is less than 8, take 2 or 4 > >> for example, the number of iso transfer descriptors will be > >> 1+(span+7)/8. > >> > >> But the formula above seems to be used for urb-> interval =1, right? > >> Why the # of iso transfer descriptors not to be span/interval but 1+(span+7)/8? > > > > Because each iTD provides information for an entire frame, i.e., 8 > > microframes. > The each micro-frame of iso transfer descriptors will not be filled > except urb->interval is 1, right? True. > if the urb->interval = 2, that mean the total number of iso transfer > descriptors we need are (1+(span+7)/8)*2 not 1+(span+7)/8, since only > half of iso transfer descriptors are filled with packets in iso sched. I don't follow your reasoning, but regardless, it is wrong. Let's consider a simple example: urb->interval = 2 and urb->number_of_packets = 12. Then span = 12 * 2 = 24 uframes. Suppose the URB's first packet is scheduled for uframe 5 of frame 61. Then the twelve packets will be scheduled for: uframe 5 of frame 61 uframe 7 of frame 61 uframe 1 of frame 62 ... uframe 1 of frame 64 uframe 3 of frame 64 There are 4 frames involved here: 61 through 64. Thus 4 iTDs are required, since each iTD handles a single frame. This agrees with the formula in the driver: 1+(24+7)/8 = 4. But your formula would give (1+(24+7)/8)*2 = 8, which is incorrect. 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