25 Aug
2011
25 Aug
'11
9:54 a.m.
Pierre-Louis Bossart wrote:
This patch relies on the USB frame counter ...
- if (frame_diff < 0)
frame_diff += 1024; /* handle 10-bit wrap-around */
After reading through some HCD source files, I deduced the following wrap-arounds:
EHCI: 8-10 bits (default 9) FHCI: 11 bits IMX21: 16 bits ISP1760: 10 bits OHCI: 16 bits OXU210HP: 10 bits R8A66597: 10 bits SL811: 5 bits(!?) UHCI: 32 bits xHCI: ?
So which hardware did you test this on? :-)
As long as there isn't an API that tells us about the valid range of the frame counter, we should probably mask off all except the lowest few bits.
Regards, Clemens