I'm CC'ing the mailing list.
On Wed, Apr 14, 2010 at 02:04:48AM +0800, Qing Pei Wang wrote:
hi kevin, i am learning the code of seabios/ohci stack followed with OHCI spec. I have some question.
Note that the OHCI support has only been tested on a modified qemu - I haven't had any reports on real hardware.
- in the function alloc_intr_pipe (usb.c line118)what does the frameexp
mean?
It's log2(epdesc->bInterval) - the log of the sampling time (in ms) requested by the device.
- how does ohci get the intervals. the code just use epdesc->bInterval, how
does it init? can pass the parameter from the usb-hid.c?
The epdesc structure is populated by get_device_config() - the config read from the device includes the device config, interface descriptions, and end point descriptions.
-Kevin
Kevin, i had tested the OHCI keyboard, the works but not pretty good as enough. the reaction time is too long. So i am trying to learn more about this things. BTW, seabios/OHCI use count=DIV_ROUND_UP(PIT_TICK_INTERVAL * 1000 * 2, PIT_TICK_RATE * ms)+1 as the td count. i can not find any document about that. Where can i find or some place i missing with OHCI spec? On Wed, Apr 14, 2010 at 9:22 AM, Kevin O'Connor kevin@koconnor.net wrote:
I'm CC'ing the mailing list.
On Wed, Apr 14, 2010 at 02:04:48AM +0800, Qing Pei Wang wrote:
hi kevin, i am learning the code of seabios/ohci stack followed with OHCI spec.
I
have some question.
Note that the OHCI support has only been tested on a modified qemu - I haven't had any reports on real hardware.
- in the function alloc_intr_pipe (usb.c line118)what does the frameexp
mean?
It's log2(epdesc->bInterval) - the log of the sampling time (in ms) requested by the device.
- how does ohci get the intervals. the code just use epdesc->bInterval,
how
does it init? can pass the parameter from the usb-hid.c?
The epdesc structure is populated by get_device_config() - the config read from the device includes the device config, interface descriptions, and end point descriptions.
-Kevin
On Thu, Apr 15, 2010 at 10:40:21AM +0800, Qing Pei Wang wrote:
Kevin, i had tested the OHCI keyboard, the works
Great! Please send the full SeaBIOS log.
but not pretty good as enough. the reaction time is too long.
Is the time it takes a key to be shown too long? Or are keys being lost when typing fast?
So i am trying to learn more about this things. BTW, seabios/OHCI use count=DIV_ROUND_UP(PIT_TICK_INTERVAL * 1000 * 2, PIT_TICK_RATE * ms)+1 as the td count. i can not find any document about that. Where can i find or some place i missing with OHCI spec?
That's internal to SeaBIOS. SeaBIOS doesn't register a hardware irq for usb, instead it polls for USB activity on every timer interrupt (~55ms). The above calculation determines how many key events to queue so that no keyboard drops occur. Usually a keyboard requests service every 10ms, causing the above calculation will return 11 queue items.
-Kevin