diff options
author | Hervé Poussineau <hpoussin@reactos.org> | 2018-10-21 21:07:21 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-11-27 07:47:50 +0100 |
commit | d2e550a82893d5498c4be51559ec2607d7f5e101 (patch) | |
tree | 7510f75db1c37dbc2323c8938d2281c078268741 /hw/input/ps2.c | |
parent | 57ac4a7a28fef81b80b547c64d26681edc4a2cda (diff) | |
download | qemu-d2e550a82893d5498c4be51559ec2607d7f5e101.zip qemu-d2e550a82893d5498c4be51559ec2607d7f5e101.tar.gz qemu-d2e550a82893d5498c4be51559ec2607d7f5e101.tar.bz2 |
ps2kbd: default to scan enabled after reset
A check for scan_enabled has been added to ps2_keyboard_event in commit
143c04c7e0639e53086519592ead15d2556bfbf2 to prevent stream corruption.
This works well as long as operating system is resetting keyboard, or enabling it.
This fixes IBM 40p firmware, which doesn't bother sending KBD_CMD_RESET,
KBD_CMD_ENABLE or KBD_CMD_RESET_ENABLE before trying to use the keyboard.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20181021190721.2148-1-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/input/ps2.c')
-rw-r--r-- | hw/input/ps2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 6c43fc2..eb33ee9 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -942,7 +942,7 @@ static void ps2_kbd_reset(void *opaque) trace_ps2_kbd_reset(opaque); ps2_common_reset(&s->common); - s->scan_enabled = 0; + s->scan_enabled = 1; s->translate = 0; s->scancode_set = 2; s->modifiers = 0; |