patch-2.1.93 linux/drivers/char/pc_keyb.c
Next file: linux/drivers/char/pty.c
Previous file: linux/drivers/char/epca.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Wed Apr 1 20:20:03 1998
- Orig file:
v2.1.92/linux/drivers/char/pc_keyb.c
- Orig date:
Wed Apr 1 20:11:49 1998
diff -u --recursive --new-file v2.1.92/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -24,6 +24,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h>
+#include <asm/irq.h>
/* Some configuration switches are present in the include file... */
@@ -48,12 +49,17 @@
* them.
*/
-#ifndef __i386__
-#define INIT_KBD
+/*
+ * Some x86 BIOSes do not correctly initializes the keyboard, so the
+ * "kbd-reset" command line options can be given to force a reset.
+ * [Ranger]
+ */
+#ifdef __i386__
+ int kbd_startup_reset __initdata = 0;
+#else
+ int kbd_startup_reset __initdata = 1;
#endif
-#ifdef INIT_KBD
-
__initfunc(static int kbd_wait_for_input(void))
{
int status, data;
@@ -202,7 +208,7 @@
printk(KERN_WARNING "initialize_kbd: %s\n", msg);
}
-#endif /* INIT_KBD */
+
unsigned char kbd_read_mask = KBD_STAT_OBF; /* Modified by psaux.c */
@@ -602,7 +608,11 @@
{
request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard", NULL);
request_region(0x60, 16, "keyboard");
-#ifdef INIT_KBD
- initialize_kbd();
-#endif
+ if (kbd_startup_reset) initialize_kbd();
+}
+
+/* for "kbd-reset" cmdline param */
+__initfunc(void kbd_reset_setup(char *str, int *ints))
+{
+ kbd_startup_reset = 1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov