On Thu, 7 Jul 2011, Sarah Sharp wrote: > In the upcoming patches, we'll use some stored endpoint information to > make software keep track of the worst-case bandwidth schedule. We need to > store several variables associated with each periodic endpoint: > - the type of endpoint > - Max Packet Size > - Mult > - Max ESIT payload > - Max Burst Size (aka number of packets, stored in one-based form) > - the endpoint interval (normalized to powers of 2 microframes) Some of this information is already stored in the endpoint descriptor and endpoint companion descriptor: the type, maxpacket size, mult, and max burst size. Also, according to my earlier suggestion, we should add a max ESIT payload field or two to the usb_host_endpoint structure. The only item this leaves for you to track explicitly is the interval. (Of course, there's no reason you can't keep local copies of the other items.) I want to change the way usbcore enables and disables endpoints during usb_set_interface() and usb_set_configuration(). There should be two arrays, one containing pointers to the endpoints that are going to be removed and the other containing pointers to the endpoints that are going to be added. Both arrays will be passed to the HCD somehow. That should make things quite a bit easier for xhci-hcd; it is essentially the model used by the xHCI hardware. For error recovery we have to be able to reinstall the old set of endpoints when something goes wrong. To do this, the first array will have to keep track of more than just the pointers to the old endpoint structures. At a minimum, for each periodic endpoint I'll need the old interval, the old phase, and the old max ESIT payload. These values can get filled in as the old endpoints are removed, and then they can be used for reinstating the former schedule settings if necessary. What do you think? 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