patch-2.3.33 linux/drivers/char/pc_keyb.c
Next file: linux/drivers/pci/setup.c
Previous file: linux/drivers/char/agp/agpgart_be.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Tue Dec 14 11:00:45 1999
- Orig file:
v2.3.32/linux/drivers/char/pc_keyb.c
- Orig date:
Fri Oct 15 15:25:13 1999
diff -u --recursive --new-file v2.3.32/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -412,6 +412,15 @@
#endif
}
+static inline void handle_keyboard_event(unsigned char scancode)
+{
+#ifdef CONFIG_VT
+ if (do_acknowledge(scancode))
+ handle_scancode(scancode, !(scancode & 0x80));
+#endif
+ mark_bh(KEYBOARD_BH);
+}
+
/*
* This reads the keyboard status port, and does the
* appropriate action.
@@ -428,20 +437,18 @@
unsigned char scancode;
scancode = kbd_read_input();
- if (status & KBD_STAT_MOUSE_OBF) {
- handle_mouse_event(scancode);
- } else {
-#ifdef CONFIG_VT
- if (do_acknowledge(scancode))
- handle_scancode(scancode, !(scancode & 0x80));
-#endif
- mark_bh(KEYBOARD_BH);
+
+ /* Ignore error bytes */
+ if (!(status & (KBD_STAT_GTO | KBD_STAT_PERR))) {
+ if (status & KBD_STAT_MOUSE_OBF)
+ handle_mouse_event(scancode);
+ else
+ handle_keyboard_event(scancode);
}
status = kbd_read_status();
- if(!work--)
- {
+ if (!--work) {
printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n",
status);
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)