Date: Tue, 15 Nov 2011 13:49:06 -0800 From: mdf@FreeBSD.org To: Hans Petter Selasky <hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r227541 - head/sys/dev/usb/controller Message-ID: <CAMBSHm9Vp=k9Z=ynsCuJ4RcV=1PT5miP2XSn3cMNu-aaEgKz0A@mail.gmail.com> In-Reply-To: <201111152222.17549.hselasky@c2i.net> References: <201111152048.pAFKmvNC016452@svn.freebsd.org> <201111152202.24093.hselasky@c2i.net> <CAMBSHm8HXCfF3yVp9fFwAAThL6Aaki=iuV7-Qtz3g7tpsm-VLw@mail.gmail.com> <201111152222.17549.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 15, 2011 at 1:22 PM, Hans Petter Selasky <hselasky@c2i.net> wrote:
> On Tuesday 15 November 2011 22:20:18 mdf@freebsd.org wrote:
>> On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky <hselasky@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm9Vp=k9Z=ynsCuJ4RcV=1PT5miP2XSn3cMNu-aaEgKz0A>
