Add extra code into kbdmux(4)s read_char() method to
poll (i.e. call read_char() method) slave keyboards. This workaround should fix problem with kbdmux(4) and atkbd(4) not working in ddb(4) and mid-boot. MFC after: 1 week
This commit is contained in:
parent
15daf52a2d
commit
6e9eacd766
@ -657,6 +657,27 @@ next_code:
|
||||
/* see if there is something in the keyboard queue */
|
||||
scancode = getc(&state->ks_inq);
|
||||
if (scancode == -1) {
|
||||
if (state->ks_flags & POLLING) {
|
||||
kbdmux_kbd_t *k;
|
||||
|
||||
SLIST_FOREACH(k, &state->ks_kbds, next) {
|
||||
while (KBDMUX_CHECK_CHAR(k->kbd)) {
|
||||
scancode = KBDMUX_READ_CHAR(k->kbd, 0);
|
||||
if (scancode == NOKEY)
|
||||
break;
|
||||
if (scancode == ERRKEY)
|
||||
continue;
|
||||
if (!KBD_IS_BUSY(k->kbd))
|
||||
continue;
|
||||
|
||||
putc(scancode, &state->ks_inq);
|
||||
}
|
||||
}
|
||||
|
||||
if (state->ks_inq.c_cc > 0)
|
||||
goto next_code;
|
||||
}
|
||||
|
||||
KBDMUX_UNLOCK(state);
|
||||
return (NOKEY);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user