On Fri, 3 Jun 2011, Soho Soho123 wrote: > Soho: is there any tolerance of index for iso schedule? The driver does not provide an index. The first time an URB is submitted for an isochronous endpoint, iso_stream_schedule() picks a starting microframe. Every time after that, each new URB is scheduled for the first available index following the end of the previous URB. > soho: about maintenance of periodic schedule list, > 1. > like we can see some code get index from h/w by ehci_readl(ehci, > &ehci->regs->frame_index) % mod, how about the purpose of % mod > after get index from h/w mod is the length of the periodic list * 8. It is calculated from the Frame List Size bits in the USBCMD register, so it can be 8092, 4096, or 2048. The value of mod is multiplied by 8 because it is in microframes (like the FRINDEX register), not in frames. > 2. > like stream->next_uframe is use by driver (software). > Do you have flow chart to explan how to link urb to h/w periodic list > and remove it from h/w? The driver doesn't link URBs into the hardware periodic list; it links iTDs. The code is in itd_link() and itd_complete(). For each URB, the driver only has to calculate the starting microframe. This is done in iso_stream_schedule(). 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