svn commit: r227541 - head/sys/dev/usb/controller
mdf at FreeBSD.org
mdf at FreeBSD.org
Tue Nov 15 21:49:08 UTC 2011
On Tue, Nov 15, 2011 at 1:22 PM, Hans Petter Selasky <hselasky at c2i.net> wrote:
> On Tuesday 15 November 2011 22:20:18 mdf at freebsd.org wrote:
>> On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky <hselasky at c2i.net>
> wrote:
>> > For USB compliant operation, the USB stack requires hz to be greater or
>> > equal to 250 hz, to put it like that. Mostly a requirement in USB
>> > gadget/device mode.
>>
>> Really? That's news to me. Is that documented somewhere? I know we
>> still use hz=100 internally, but we're on stable/7 still so not using
>> the new USB stack yet.
>
> No it is not documented anywhere. This delay is mostly critical if you enable
> USB power saving features like suspend and resume. Then there are some
> software timers which should not derive too much.
>
> Most of the time the delays in USB are not critical. Transfer timers are in
> the seconds range and that works fine with hz=100.
>
> Where and how should I document such are requirement?
>
> Add something during system init?
>
> if (hz < 250)
> printf("USB: hz is too low (ignored)\n");
I'm not sure what functions we have for detecting the OS instance is
virtualized, but something like that would be useful if it's really
important. Perhaps:
"USB: hz value less than 250 may cause functional issues"
Thanks,
matthew
More information about the svn-src-head
mailing list