Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/dev Add a comment that .set_leds function w...



details:   https://anonhg.NetBSD.org/src/rev/64f351926d06
branches:  trunk
changeset: 1023656:64f351926d06
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Sep 20 08:31:09 2021 +0000

description:
Add a comment that .set_leds function won't work correctly on cngetc(9).

I'm afraid all other keyboard drivers that have .set_leds function
(like sgimips/dev/zs_kbd.c) have the same issue.
Maybe we needs 'polled' flag in .set_leds function, or an independent
.set_leds accessop in struct wskbd_consops for cons(9).

diffstat:

 sys/arch/luna68k/dev/lunaws.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 8f02643e9125 -r 64f351926d06 sys/arch/luna68k/dev/lunaws.c
--- a/sys/arch/luna68k/dev/lunaws.c     Mon Sep 20 02:26:05 2021 +0000
+++ b/sys/arch/luna68k/dev/lunaws.c     Mon Sep 20 08:31:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.37 2021/09/19 11:43:54 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.38 2021/09/20 08:31:09 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.37 2021/09/19 11:43:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.38 2021/09/20 08:31:09 tsutsui Exp $");
 
 #include "opt_wsdisplay_compat.h"
 #include "wsmouse.h"
@@ -571,6 +571,16 @@
        struct ws_softc *sc = cookie;
        uint8_t ledcmd;
 
+       /*
+        * XXX:
+        *  Why does MI wskbd(4) use a common .set_leds function
+        *  for both kernel cons(9) and normal tty devices!?
+        *
+        *  When CAP key is pressed in cngetc(9) (like ddb(4) etc.)
+        *  after wskbd(4) is attached, all LED commands are queued
+        *  into txq[] and will never be sent until ddb(4) returns.
+        */
+
        sc->sc_leds = leds;
        if ((leds & WSKBD_LED_CAPS) != 0) {
                ledcmd = OMKBD_LED_ON_CAPS;



Home | Main Index | Thread Index | Old Index