diff options
author | emax <emax@FreeBSD.org> | 2006-09-18 22:56:59 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2006-09-18 22:56:59 +0000 |
commit | 2ec441fc93f6e691529d334cd865aeaa808b718c (patch) | |
tree | 234e2a603e697bd7af8b5b011e33bc494ba2546a /sys/dev/uart/uart_kbd_sun.c | |
parent | c77f49028df44e7d45f1dc280dc848de1ace9270 (diff) | |
download | FreeBSD-src-2ec441fc93f6e691529d334cd865aeaa808b718c.zip FreeBSD-src-2ec441fc93f6e691529d334cd865aeaa808b718c.tar.gz |
Do not try to call keyboard callback unless keyboard is active and busy.
This should fix 'kbdcontrol -K < /dev/console' panic on sparc64 with sunkbd(4).
PR: sparc64/96798
MFC after: 1 week
Diffstat (limited to 'sys/dev/uart/uart_kbd_sun.c')
-rw-r--r-- | sys/dev/uart/uart_kbd_sun.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/uart/uart_kbd_sun.c b/sys/dev/uart/uart_kbd_sun.c index f3f7b2c..02db9c6 100644 --- a/sys/dev/uart/uart_kbd_sun.c +++ b/sys/dev/uart/uart_kbd_sun.c @@ -549,9 +549,11 @@ sunkbd_repeat(void *v) { struct sunkbd_softc *sc = v; - if (sc->sc_repeat_key != -1) { - sc->sc_repeating = 1; - sc->sc_kbd.kb_callback.kc_func(&sc->sc_kbd, - KBDIO_KEYINPUT, sc->sc_kbd.kb_callback.kc_arg); + if (KBD_IS_ACTIVE(&sc->sc_kbd) && KBD_IS_BUSY(&sc->sc_kbd)) { + if (sc->sc_repeat_key != -1) { + sc->sc_repeating = 1; + sc->sc_kbd.kb_callback.kc_func(&sc->sc_kbd, + KBDIO_KEYINPUT, sc->sc_kbd.kb_callback.kc_arg); + } } } |