[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset |
Date: |
Tue, 27 Nov 2018 07:49:28 +0100 |
From: Hervé Poussineau <address@hidden>
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 <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/input/ps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 6c43fc2912..eb33ee9b6f 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;
--
2.9.3
- [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches, Gerd Hoffmann, 2018/11/27
- [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert, Gerd Hoffmann, 2018/11/27
- [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active, Gerd Hoffmann, 2018/11/27
- [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use, Gerd Hoffmann, 2018/11/27
- [Qemu-devel] [PULL 6/6] qapi: add query-display-options command, Gerd Hoffmann, 2018/11/27
- [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size, Gerd Hoffmann, 2018/11/27
- Re: [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches, Peter Maydell, 2018/11/27
- Re: [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches, no-reply, 2018/11/28