Re: PS/2 keyboard support in mid-boot borked

From: Maksim Yevmenkin <maksim.yevmenkin_at_savvis.net>
Date: Tue, 11 Jul 2006 12:51:57 -0700
Eric Anderson wrote:

[..]

>>> I hope this will be something more than a FAQ with some patches floating
>>> around for 7.0-RELEASE.
>>
>> if you use usb keyboard (or ps2 to usb converter with ps2 keyboard), 
>> does it work?
> 
> Yes.

ok, good.

>> like i said before, i think, the problem is that atkbd(4) does not 
>> deal with "polled" mode properly. kbdmux(4) never sees input from 
>> atkbd(4) because (imo) atkbd(4) interrupt handler is never called. the 
>> atkbd(4) patch i posted awhile ago has a regression, i.e. atkbd(4) 
>> produces duplicate characters in ddb(4), midboot, etc. *without* 
>> kbdmux(4). patched atkbd(4) with kbdmux(4) works fine.
>>
>> i'm actually a bit puzzled why atkbd(4) works without kbdmux(4) in 
>> ddb(4), midboot,e etc. obviously i need to spend some quality time 
>> with the debugger :) i hope to get to it, eventually :) sorry for the 
>> delay.
> 
> What can we do to help you debug it?  I know for me, it's a major pain, 
> and I'm sure others have gotten jammed up too.

i just spent half of my lunch hour with the debugger :) and, i think, i 
know what is going on here. i think, there is some twisted interaction 
going on in

sccngetch(int flags)
{
...
     kbd_poll(scp->sc->kbd, TRUE);
     c = scgetc(scp->sc, SCGETC_CN | flags);
     kbd_poll(scp->sc->kbd, FALSE);
...
}

and

sckbdevent()
{
...
     while ((c = scgetc(sc, SCGETC_NONBLOCK)) != NOKEY) {
...
}

code that causes duplicated input in atkbd(4) without kbdmux(4). so, my 
original patch was not 100% correct. i will try to redo it to see if i 
can work around the problem.

thanks,
max
Received on Tue Jul 11 2006 - 17:52:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC