NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-sun3/54873: 9.0_RC1 sun3 GENERIC panic by keyboard with serial console
The following reply was made to PR port-sun3/54873; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-sun3/54873: 9.0_RC1 sun3 GENERIC panic by keyboard with serial
console
Date: Sun, 19 Jan 2020 05:17:25 +0900
> Note: There was a bad value `' for the field `Confidential'.
> It was set to the default value of `yes'.
Fixed in gnats.
> >Fix:
> Looks missing callout initialization. I'll check what's wrong.
The problem is in src/sys/dev/sun/kbd.c on ports which have not
switched to wscons, i.e. only sun3 is affected.
In src/sys/dev/sun/kbd.c a callout(9) for auto keyrepeat
is initialized only if it's attached as console, but
it touches the callout via kb_input_console even if
/dev/kbd is not console.
The following diff fixes the panic (and keyboard console
still works at least on TME):
---
Index: sys/dev/sun/kbd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sun/kbd.c,v
retrieving revision 1.69
diff -u -p -d -r1.69 kbd.c
--- sys/dev/sun/kbd.c 8 Feb 2018 10:52:05 -0000 1.69
+++ sys/dev/sun/kbd.c 18 Jan 2020 20:16:08 -0000
@@ -202,7 +202,7 @@ kbdopen(dev_t dev, int flags, int mode,
k->k_events.ev_io = l->l_proc;
/* stop pending autorepeat of console input */
- if (k->k_repeating) {
+ if (k->k_cc != NULL && k->k_repeating) {
k->k_repeating = 0;
callout_stop(&k->k_repeat_ch);
}
@@ -492,9 +492,11 @@ kbd_input(struct kbd_softc *k, int code)
/*
* If /dev/kbd is not connected in event mode, or wskbd mode,
- * translate and send upstream (to console).
+ * and is attached as console, translate and send upstream
+ * (to console).
*/
- kbd_input_console(k, code);
+ if (k->k_cc != NULL)
+ kbd_input_console(k, code);
}
--
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index