patch-2.3.41 linux/drivers/char/pc_keyb.c
Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/moxa.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Fri Jan 21 13:03:02 2000
- Orig file:
v2.3.40/linux/drivers/char/pc_keyb.c
- Orig date:
Wed Dec 29 13:13:15 1999
diff -u --recursive --new-file v2.3.40/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -412,8 +412,11 @@
#endif
}
+static unsigned char kbd_exists = 1;
+
static inline void handle_keyboard_event(unsigned char scancode)
{
+ kbd_exists = 1;
#ifdef CONFIG_VT
if (do_acknowledge(scancode))
handle_scancode(scancode, !(scancode & 0x80));
@@ -482,6 +485,8 @@
{
int retries = 3;
+ if (!kbd_exists) return 0;
+
do {
unsigned long timeout = KBD_TIMEOUT;
@@ -497,8 +502,9 @@
mdelay(1);
if (!--timeout) {
#ifdef KBD_REPORT_TIMEOUTS
- printk(KERN_WARNING "Keyboard timeout[2]\n");
+ printk(KERN_WARNING "keyboard: Timeout - AT keyboard not present?\n");
#endif
+ kbd_exists = 0;
return 0;
}
}
@@ -506,6 +512,7 @@
#ifdef KBD_REPORT_TIMEOUTS
printk(KERN_WARNING "keyboard: Too many NACKs -- noisy kbd cable?\n");
#endif
+ kbd_exists = 0;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)