https://git.reactos.org/?p=reactos.git;a=commitdiff;h=10645167b8cf68a21e194…
commit 10645167b8cf68a21e1944444c6278d9c92835c4
Author: Nikita Krapivin <33228822+nkrapivin(a)users.noreply.github.com>
AuthorDate: Thu Mar 22 02:07:30 2018 +0500
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Mar 21 22:07:30 2018 +0100
[I8042PRT] Enable keyboard clock explicitly (fixes Lenovo ACPI bug). CORE-14256
(#434)
---
drivers/input/i8042prt/i8042prt.h | 2 ++
drivers/input/i8042prt/pnp.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/input/i8042prt/i8042prt.h b/drivers/input/i8042prt/i8042prt.h
index acae330ecc..71be982326 100644
--- a/drivers/input/i8042prt/i8042prt.h
+++ b/drivers/input/i8042prt/i8042prt.h
@@ -223,6 +223,8 @@ typedef struct _I8042_HOOK_WORKITEM
#define MOUSE_ENAB 0xA8
#define MOUSE_LINE_TEST 0xA9
#define CTRL_SELF_TEST 0xAA
+#define KBD_CLK_DISABLE 0xAD
+#define KBD_CLK_ENABLE 0xAE
#define CTRL_WRITE_MOUSE 0xD4
/*-----------------------------------------------------
diff --git a/drivers/input/i8042prt/pnp.c b/drivers/input/i8042prt/pnp.c
index b95dc9a98a..e5fe57b208 100644
--- a/drivers/input/i8042prt/pnp.c
+++ b/drivers/input/i8042prt/pnp.c
@@ -274,6 +274,10 @@ i8042ConnectKeyboardInterrupt(
TRACE_(I8042PRT, "i8042ConnectKeyboardInterrupt()\n");
PortDeviceExtension = DeviceExtension->Common.PortDeviceExtension;
+
+ // Enable keyboard clock line
+ i8042Write(PortDeviceExtension, PortDeviceExtension->ControlPort,
KBD_CLK_ENABLE);
+
DirqlMax = MAX(
PortDeviceExtension->KeyboardInterrupt.Dirql,
PortDeviceExtension->MouseInterrupt.Dirql);