Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Mar 1997 01:59:11 -0800 (PST)
From:      yokota@zodiac.mech.utsunomiya-u.ac.jp
To:        freebsd-gnats-submit@freebsd.org
Subject:   i386/3130: Dell Latitude keyboard lock up
Message-ID:  <199703280959.BAA00868@freefall.freebsd.org>
Resent-Message-ID: <199703281000.CAA00999@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3130
>Category:       i386
>Synopsis:       Dell Latitude keyboard lock up
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          support
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 28 02:00:03 PST 1997
>Last-Modified:
>Originator:     Kazutaka YOKOTA
>Organization:
Utsunomiya University
>Release:        2.2-RELEASE, 3.0-CURRENT
>Environment:
Sorry, I am not the one who is experiencing the problem...
>Description:
I am filing this report just for the record.

There have been two independent reports from Dell Latitude XPi
notebook/laptop owners. 

Keyboard locks up when `kbdcontrol' tries to change typematic rate, 
or the X server (XFree86 or Accelerated X) starts up.

The Latitude seems to be the only system which suffers from this problem.  
(I don't know the problem is with the entire Latitude line or with only 
some Latitude models) No problem report has been heard about other 
systems (I certainly cannot reproduce the problem in my -current 
and 2.2 systems).

In 3.0-CURRENT, 2.2-RELEASE and 2.2-GAMMA-970310, when programming the
keyboard LED/repeat-rate, `set_keyboard()' in `syscons' tells the
keyboard controller not to generate keyboard interrupt (IRQ1) and then
enable tty interrupts, expecting the keyboard interrupt doesn't occur.

It appears that somehow Latitude's keyboard controller still generates
the keyboard interrupt thereafter, and `set_keyboard()' doesn't see
the return code from the keyboard because it is consumed by the
keyboard interrupt handler.


>How-To-Repeat:
Install 2.2-RELEASE or 3.0-CURRENT on a Latitude and run:
    kbdcontrol -r fast

>Fix:
Work around for those who newly installing 2.2-RELEASE is that he
should not set key repeat rate during install, and once installation
is finished and the system boots up, patch `syscons.c' and rebuild the
kernel.

The following patch entirely disables tty interrupts while setting 
LED and typematic rate in `set_keyboard()', making the routine behave 
more like the previous versions of `syscons' (versions in 2.1.X and
2.2-ALPHA, -BETA, and some -GAMMAs). The reporter said this patch
eliminated the problem.

(I also found another typo/bug, but the reporter and I found that it
wasn't the cause of the problem...)

--- syscons.c-dist      Mon Mar  3 10:09:00 1997
+++ syscons.c   Mon Mar 17 08:02:35 1997
@@ -3110,11 +3111,12 @@

     /* disable the keyboard and mouse interrupt */
     s = spltty();
+#if 0
     c = get_controller_command_byte(sc_kbdc);
     if ((c == -1)
        || !set_controller_command_byte(sc_kbdc,
             kbdc_get_device_mask(sc_kbdc),
-            KBD_ENABLE_KBD_PORT | KBD_DISABLE_KBD_INT
+            KBD_DISABLE_KBD_PORT | KBD_DISABLE_KBD_INT
                 | KBD_DISABLE_AUX_PORT | KBD_DISABLE_AUX_INT)) {
        /* CONTROLLER ERROR */
         kbdc_lock(sc_kbdc, FALSE);
@@ -3129,15 +3131,21 @@
      * by the lock flag set via `kbdc_lock()'
      */
     splx(s);
+#endif

-    send_kbd_command_and_data(sc_kbdc, command, data);
+    if (send_kbd_command_and_data(sc_kbdc, command, data) != KBD_ACK)
+        send_kbd_command(sc_kbdc, KBDC_ENABLE_KBD);

+#if 0
     /* restore the interrupts */
     if (!set_controller_command_byte(sc_kbdc,
             kbdc_get_device_mask(sc_kbdc),
            c & (KBD_KBD_CONTROL_BITS | KBD_AUX_CONTROL_BITS))) {
        /* CONTROLLER ERROR */
     }
+#else
+    splx(s);
+#endif
     kbdc_lock(sc_kbdc, FALSE);
 }


>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703280959.BAA00868>