patch-2.2.16 linux/drivers/char/pc_keyb.c
Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/nvram.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Wed Jun 7 14:26:42 2000
- Orig file:
v2.2.15/linux/drivers/char/pc_keyb.c
- Orig date:
Mon Aug 9 12:04:39 1999
diff -urN v2.2.15/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -56,6 +56,9 @@
static void kbd_write_command_w(int data);
static void kbd_write_output_w(int data);
+#ifdef CONFIG_PSMOUSE
+static void aux_write_ack(int val);
+#endif
spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
static unsigned char handle_kbd_event(void);
@@ -73,6 +76,9 @@
static int __init psaux_init(void);
+#define AUX_RECONNECT 170
+/* #define CHECK_RECONNECT_SCANCODE 1 */
+
static struct aux_queue *queue; /* Mouse data buffer. */
static int aux_count = 0;
/* used when we send commands to the mouse that expect an ACK. */
@@ -393,6 +399,19 @@
}
mouse_reply_expected = 0;
}
+ else if(scancode == AUX_RECONNECT){
+ queue->head = queue->tail = 0; /* Flush input queue */
+ /*
+ * need this stuff? seems to work fine w/o it for me
+ aux_write_ack(AUX_SET_SAMPLE);
+ aux_write_ack(100);
+ aux_write_ack(AUX_SET_RES);
+ aux_write_ack(3);
+ aux_write_ack(AUX_SET_SCALE21);
+ */
+ aux_write_ack(AUX_ENABLE_DEV); /* ping the mouse :) */
+ return;
+ }
add_mouse_randomness(scancode);
if (aux_count) {
@@ -426,6 +445,9 @@
unsigned char scancode;
scancode = kbd_read_input();
+# ifdef CHECK_RECONNECT_SCANCODE
+ printk(KERN_INFO "-=db=-: kbd_read_input() : scancode == %d\n",scancode);
+# endif
if (status & KBD_STAT_MOUSE_OBF) {
handle_mouse_event(scancode);
} else {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)