lkml.org 
[lkml]   [1999]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[patch] Ps2 mouse/keyboard hang fix. (Digital HiNote)
Hi All,
After two solid days of frustration, a coworker and I found
and fixed a bug in the the Linux ps2 mouse/keyboard driver. After a
certain amount of mouse use, the keyboard and mouse would hang,
leaving the machine unresponsive to keypresses.

The problem was as follows.

The Linux driver polled the ps2 status register faster than the device
could keep up. The FreeBSD ps2 driver inserted a pause between the
polls. By doing the same in Linux, the problem disappears.

This bug showed up on our Digital HiNote CT475 laptops. Without the
fix, the boxes are quite useless.

This fix shouldn't harm anyone, but may help some. (It may eliminate the
"pc_keyboard jammed" warning that appears right below the patch.)

Attached is a patch for both 2.2.13 and 2.3.28.

Cheers,
--Phil

Compaq: High Performance Server Division/Benchmark Performance Engineering
---------------- Alpha, The Fastest Processor on Earth --------------------
Phillip.Ezolt@compaq.com |C|O|M|P|A|Q| ezolt@perf.zko.dec.com


diff -ur linux-orig/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- linux-orig/drivers/char/pc_keyb.c Mon Aug 9 15:04:39 1999
+++ linux/drivers/char/pc_keyb.c Mon Nov 15 19:27:09 1999
@@ -433,7 +433,7 @@
handle_scancode(scancode, !(scancode & 0x80));
mark_bh(KEYBOARD_BH);
}
-
+ mdelay(1);
status = kbd_read_status();

if(!work--)diff -ur linux-orig/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- linux-orig/drivers/char/pc_keyb.c Tue Oct 12 16:25:07 1999
+++ linux/drivers/char/pc_keyb.c Mon Nov 15 19:40:24 1999
@@ -437,7 +437,7 @@
#endif
mark_bh(KEYBOARD_BH);
}
-
+ mdelay(1);
status = kbd_read_status();

if(!work--)
Only in linux/drivers/char: pc_keyb.c~
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.022 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site