]> git.neil.brown.name Git - history.git/commitdiff
Fix i8042.c to ignore fake key releases generated by AT keyboard
authorVojtech Pavlik <vojtech@suse.cz>
Wed, 21 Aug 2002 21:00:13 +0000 (23:00 +0200)
committerVojtech Pavlik <vojtech@suse.cz>
Wed, 21 Aug 2002 21:00:13 +0000 (23:00 +0200)
in translated set 2. This fixes a problem where shift-pgup, with
the pgup released first generated an unknown scancode warning and
the shift remained stuck.

drivers/input/serio/i8042.c

index dc574db0f933d97900463315608c3de18ad04618..6c577b4c756d292d348d562a2c5a89d281c0ef29 100644 (file)
@@ -54,6 +54,7 @@ static struct serio i8042_kbd_port;
 static struct serio i8042_aux_port;
 static unsigned char i8042_initial_ctr;
 static unsigned char i8042_ctr;
+static unsigned char i8042_last_e0;
 struct timer_list i8042_timer;
 
 #ifdef I8042_DEBUG_IO
@@ -366,12 +367,15 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                        if (data > 0x7f) {
                                                if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
                                                        serio_interrupt(&i8042_kbd_port, 0xf0, dfl);
+                                                       if (i8042_last_e0 && (data == 0xaa || data == 0xb6))
+                                                               set_bit(data & 0x7f, i8042_unxlate_seen);
                                                        data = i8042_unxlate_table[data & 0x7f];
                                                }
                                        } else {
                                                set_bit(data, i8042_unxlate_seen);
                                                data = i8042_unxlate_table[data];
                                        }
+                                       i8042_last_e0 = (data == 0xe0);
                                }
                                serio_interrupt(&i8042_kbd_port, data, dfl);
                        }