On Monday 30 May 2005 9:26 am, Alan Stern wrote:
> On Sun, 29 May 2005, Patrick Boettcher wrote:
> 
> > Is there method or rule how to calcuate the number of frames/urb needed? 
> > Do I have to calculate it at all?
> 
> There is no hard-and-fast rule.  However some host controller drivers are 
> limited as to how far in the future they can schedule an ISO transfer.  
> You should probably have not much more than 1/2 second worth of frames 
> queued at any time.  You can divide that up into URBs almost any way you 
> like, subject to your latency requirements.

And there can be hardware limits too.  1/2 second can exceed them.  This
comment in ehci-sched gives more portable guidelines:

/*
 * This scheduler plans almost as far into the future as it has actual
 * periodic schedule slots.  (Affected by TUNE_FLS, which defaults to
 * "as small as possible" to be cache-friendlier.)  That limits the size
 * transfers you can stream reliably; avoid more than 64 msec per urb.
 * Also avoid queue depths of less than ehci's worst irq latency (affected
 * by the per-urb URB_NO_INTERRUPT hint, the log2_irq_thresh module parameter,
 * and other factors); or more than about 230 msec total (for portability,
 * given EHCI_TUNE_FLS and the slop).  Or, write a smarter scheduler!
 */

Frames-per-URB isn't the most useful measure; that'd be msec-per-URB,
or in some cases KBytes-per-URB.  Requiring more than a page of buffer
per URB can be troublesome due to kernel memory allocation issues; you
can't reliably allocate buffers that take more than one page.


> > I always get the following errors:
> > ehci_hcd 0000:00:1d.7: devpath 2.1 ep2in 3strikes
> > 
> > What does the error mean exactly? I assume that I did something wrong... 
> > but what?
> 
> The "ehci_hcd 0000:00:1d.7" part tells you which host controller driver 
> and which controller encountered the error.  The "devpath 2.1 ep2in" part 
> tells you the error occurred when communicating with device usb-2.1, 
> endpoint 2, while performing an IN transfer.  The "3strikes" part means 
> three errors occurred so the controller is giving up.
> 
> From that message alone it's impossible to tell exactly what the error 
> was.  Basically all it means is that the computer was expecting a response 
> from the USB device and didn't get one.

It does however strongly suggest you weren't using isochronous endpoints,
since "3strikes" is not an ISO error.  :)

- Dave


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to