From d0b8731a666f39249fcb5edde0cecdb2c83d0cf3 Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Thu, 10 Apr 1997 12:26:50 +0000 Subject: Preserve some bits in the keyboard controller command byte when resetting the keyboard. Well, sorry, this bug is totally my fault. I DID intend to preserve them, but somehow I failed. The bug puts some old keyboard controllers in a strange state, resulting in keyboard freeze or random key input. The fix closes PR kern/3067. --- sys/dev/syscons/syscons.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 1ce6e8ba81c5..c4f1cd96b961 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.207 1997/03/28 10:11:24 yokota Exp $ + * $Id: syscons.c,v 1.208 1997/04/03 21:42:42 brian Exp $ */ #include "sc.h" @@ -331,14 +331,10 @@ scprobe(struct isa_device *dev) c |= KBD_OVERRIDE_KBD_LOCK; #endif - /* - * enable the keyboard port, but disable the keyboard intr. - * the aux port (mouse port) is disabled too. - */ + /* enable the keyboard port, but disable the keyboard intr. */ if (!set_controller_command_byte(sc_kbdc, - KBD_KBD_CONTROL_BITS | KBD_AUX_CONTROL_BITS, - KBD_ENABLE_KBD_PORT | KBD_DISABLE_KBD_INT - | KBD_DISABLE_AUX_PORT | KBD_DISABLE_AUX_INT)) { + KBD_KBD_CONTROL_BITS, + KBD_ENABLE_KBD_PORT | KBD_DISABLE_KBD_INT)) { /* CONTROLLER ERROR * there is very little we can do... */ @@ -410,8 +406,8 @@ scprobe(struct isa_device *dev) } /* enable the keyboard port and intr. */ if (!set_controller_command_byte(sc_kbdc, - KBD_KBD_CONTROL_BITS | KBD_AUX_CONTROL_BITS | KBD_OVERRIDE_KBD_LOCK, - (c & (KBD_AUX_CONTROL_BITS | KBD_OVERRIDE_KBD_LOCK)) + KBD_KBD_CONTROL_BITS | KBD_TRANSLATION | KBD_OVERRIDE_KBD_LOCK, + (c & (KBD_TRANSLATION | KBD_OVERRIDE_KBD_LOCK)) | KBD_ENABLE_KBD_PORT | KBD_ENABLE_KBD_INT)) { /* CONTROLLER ERROR * This is serious; we are left with the disabled keyboard intr. -- cgit v1.3