From owner-freebsd-hackers Thu Mar 27 22:54:20 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA24141 for hackers-outgoing; Thu, 27 Mar 1997 22:54:20 -0800 (PST) Received: from mailsrv.cc.utsunomiya-u.ac.jp (mailsrv.cc.utsunomiya-u.ac.jp [160.12.200.20]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA24121; Thu, 27 Mar 1997 22:54:15 -0800 (PST) Received: from zodiac.mech.utsunomiya-u.ac.jp (kcQ8k77UcVrWIoO69OOTadZgLAfwRSFo@zodiac.mech.utsunomiya-u.ac.jp [160.12.33.1]) by mailsrv.cc.utsunomiya-u.ac.jp (8.8.5+2.7Wbeta5/3.5Wpl4) with ESMTP id PAA17757; Fri, 28 Mar 1997 15:53:18 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zenith.mech.utsunomiya-u.ac.jp [160.12.33.60]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id PAA29688; Fri, 28 Mar 1997 15:57:36 +0900 (JST) Message-Id: <199703280657.PAA29688@zodiac.mech.utsunomiya-u.ac.jp> To: Ian Kallen cc: freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: (Dell Latitude) psm0/sc0 conflicts killing X? In-reply-to: Your message of "Thu, 27 Mar 1997 21:14:55 PST." References: Date: Fri, 28 Mar 1997 15:57:30 +0900 From: Kazutaka YOKOTA Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Yes, I got almost the exact same messages, including > sc0: kbdc is LOCKED!! (scintr) Now, may I assume you got the messages in the following order, the return code was "fa" ("zz" in the fifth line) and the keyboard did NOT freeze? sc0: enabling tty intr. (set_keyboard) sc0: about to send command and data (set_keyboard) sc0: kbdc is LOCKED!! (scintr) sc0: kbdc is LOCKED!! (scintr) sc0: command:xx data:yy ret:zz (set_keybard) ~~ sc0: kbdc is LOCKED!! (scintr) >well, if you have a fix, I'd be happy to test it for you :) Shall I >revert to the original syscons.c or will patching it with the debugging >stuff be OK? Please revert to the original syscons.c and apply the following patch. It is known to work, that is, kbdcontrol can change key repeat rate and the X server doesn't lock up the keyboard. This patch doesn't generate debug messages, so it will be more suitable for daily use than the previous one. Kazu --- 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); }