Commit ea675330 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Fix i8042.c to ignore fake key releases generated by AT keyboard

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.
parent 731418bc
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment