On Thu, 24 Jul 2003, David Brownell wrote: > >>>It'd also be good to let USB device drivers know the biggest iso period > >>>that can be scheduled. It's not necessarily the same as the biggest > >>>interrupt period, and on EHCI it's also configurable. Otherwise drivers > >>>will not be able to tell in advance what requests are legal. > >> > >>Is it always as large or larger than 1024 frames? > >> > >>UHCI has a fixed schedule of 1024 frames.... > > > > > > We shouldn't rely on a fixed bound like 1024 because in the future someone > > might come along with a HCD that only uses 512. > > Including EHCI, which we currently configure to use only 256 by default > > I'd go for something like this patch. It resolves a FIXME and > makes a small behavior change: if the period is too big, it no > longer automagically limits it except for the case of full speed > interrupt transfers. (Which continue with the current behavior, > making a lot of drivers happier on OHCI.) > > Comments? Perhaps the bounds tests should use "limit - 1" to > behave better, but they've behaved so far (most periods are short > enough not to have issues).
A few comments. You can't set periodic_iso_limit to 1024 on UHCI, because the driver reserves a grace period of 10 frames. The largest legal value is therefore UHCI_NUMFRAMES - 11. Also, UHCI doesn't require iso. periods to be powers of 2. There's another check that could be added to usb_submit_urb() if you're feeling particularly paranoid. In the loop where the iso. descriptors' status and actual_length fields are initialized, you could make sure that offset + len <= transfer_buffer_length. Alan Stern ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel