Re: Fwd: Re: Reading the frame number field
"Steve Calfee" <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
>> >>On Thu, 12 Apr 2007, Danny Budik wrote: >> >> > Would it be possible to add my own constant to /usr/include/linux/ >> > usbdevice_fs.h and write an underlying function that would call >> > usb_get_current_frame_number()? It >> > looks like I can add a constant say USBDEVFS_FRAMENUM in >> > usbdevice_fs.h, add new case to .../drivers/usb/core/devio.c, add a >> > function called proc_framenum >> > that would call usb_get_current_frame_number() and return the frame >> > number. Is this a reasonable and/or feasible solution? >> >>Yes, that would work. Subject to the restriction that the frame number >>is constantly changing so that any value you receive can quickly become >>out-of-date. >> >>Also bear in mind that high-speed buses use microframes rather than >>frames; they increment eight times more quickly. >> >>Alan Stern >> >> Hi Alan, that is not right. See USB 2.0 spec 8.4.3.1 USB Frames and Microframes Where it says: <quote> High-speed devices see an SOF packet with the same frame number eight times (every 125 μs) during each 1 ms period. If desired, a high-speed device can locally determine a particular microframe number by detecting the SOF that had a different frame number than the previous SOF and treating that as the zeroth microframe. The next seven SOFs with the same frame number can be treated as microframes 1 through 7. </quote> I guess the USB 2.0 spec designers did not see any use for a number that changed every 125 usec, and where the field would roll over every 1/4 second instead of every 2 seconds. It is not clear what use (in a non-real time OS), the frame count is in userspace? Regards, Steve _________________________________________________________________ Interest Rates Fall Again! $430,000 Mortgage for $1,399/mo - Calculate new payment http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18679&moid=7581 ------------------------------------------------------------------------- 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 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel