On 10/5/06, Alan Stern <[EMAIL PROTECTED]> wrote: > Bandwidth is allocated in the USB budget as soon as the first URB of a > stream is submitted. That bandwidth remains allocated until the stream is > interrupted, which happens whenever there are no URBs queued for the > endpoint and the last completion handler has returned.
Almost correct; in my scheduler, bandwidth remains allocated until the stream is disabled. Otherwise any minor interruption in streaming could cause an open/active endpoint to lose its bandwidth allocation irrevocably. The only thing worse than having an underrun in a professional situation is not being able to recover from the underrun because bandwidth allocation is released and you might not be able to get it back. In the past I have had to explain to my stage manager why I had to restart a master audio controller in the middle of a show, losing all foley and effects until it came back, because a USB audio device underran and the USB subsystem did not recover. This is a situation I never want to be in again. We did not and still do not have schedule rebalancing in the EHCI driver. When an endpoint that's fit into a schedule that's using > 90% of theoretical bandwidth loses its allocation, it will not get it back because we can't currently recover the fragmentation. > The only way a "gap" could arise is if something prevents the host > controller driver from giving back a completed URB or the device driver > from submitting a new URB in a timely manner. Correct. And that couldn't ever happen could it? :-) > When the new URB finally > does get submitted too late, some of its transactions will get errors > because they were not scheduled until after their time had already passed. ... by your description, the endpoint would have to be rebudgeted and rescheduled, because the bandwidth was released as soon as the underrun occured. In my patches, the bandwidth (and the budget) are not released unless the device is closed (or endpoint disable is called for some other reason). The previous situation was broken in a very practical sense. Monty ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel