How should the interval field in an urb for USB 2.0
interpretted? Is it microframes (125 micro-seconds)
as the ehci code seems to assume? Or should it be
interpretted like the bInterval field in an endpoint
descriptor?
The USB 2.0 spec, section 9.6.6, Table 9-13, says
For high-speed interrupt endpoints, the bInterval value
is used as the exponent for a 2^(bInterval-1) value; eg
a bInterval of 4 means a period of 8 (2^(4-1)).
Above that it explains that for high speed this represents
microframes at 125 micro-seconds each.
It seems to me the URB interval field should be interpretted
as an exponent like this for USB 2.0--so that you can just pass
the bInterval you get from the endpoint descriptor on to the urb
without having to do any calculations.
If that is true, then I think something like the following patch
is needed in ehci-q.c:
--- ehci-q.c.orig 2003-08-28 19:07:23.000000000 -0500
+++ ehci-q.c 2003-08-28 19:10:41.000000000 -0500
@@ -652,12 +652,12 @@
qh->gap_uf = 0;
/* FIXME handle HS periods of less than 1 frame. */
- qh->period = urb->interval >> 3;
- if (qh->period < 1) {
+ if (urb->interval < 4) {
dbg ("intr period %d uframes, NYET!",
- urb->interval);
+ 1<<(urb->interval-1));
goto done;
}
+ qh->period = 1 << (urb->interval-4);
} else {
/* gap is f(FS/LS transfer times) */
qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed,
NOTE: This is _not_ an attempt to allow more than one high speed
interrupt per frame that the FIXME is talking about. This merely
computes the number of micro-frames based on the USB spec.
NOTE: I am still trying to get USB 2.0 interrupt transfers working for me
in 2.4.20 and .22. I have not had time to track down the problems beyond
this issue with how the interval is interpretted. For now I put my device
behind a 1.1 hub to fall back to 1.1 where interrupt transfers are working
fine for me.
-- Al
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel