[CFR] add usb_sleepout.[ch]

Andrew Thompson thompsa at FreeBSD.org
Sat Oct 30 23:52:52 UTC 2010


On 31 October 2010 12:19, Weongyo Jeong <weongyo.jeong at gmail.com> wrote:
> Hello USB guys,
>
> The following patch is to add a implementation, called `sleepout'.
> Please reviews.  I'd like to commit it into HEAD if no objections.
>
>  Adds `sleepout' prototype which is a comic combination of callout(9) and
>  taskqueue(8) only for USB drivers to implement one step timer.  In
>  current USB drivers using callout(9) interface they all have two step
>  execution flow as follows:
>
>    1. callout callback is fired by the interrupt context.  Then it needs
>       to pass it to USB process context because it could sleep(!) while
>       callout(9) don't allow it.
>    2. In the USB process context it operates USB commands that most of
>       times it'd be blocked at least 125 us (it'd be always true for USB)


I think it is a good addition.


Andrew


More information about the freebsd-usb mailing list