Skip to content
Snippets Groups Projects
Commit 26f33496 authored by Jeroen Dekkers's avatar Jeroen Dekkers Committed by Colin Watson
Browse files

Initialize keyboard in at_keyboard module init if keyboard is ready

Closes: #741464
parents 129db321 2457fd63
No related branches found
No related tags found
No related merge requests found
# see git-dpm(1) from git-dpm package
73b07367fbcdaeae0ebdad3101726e0274e1943f
73b07367fbcdaeae0ebdad3101726e0274e1943f
2457fd63704a5e9da241579618b9ac3a6f08f689
2457fd63704a5e9da241579618b9ac3a6f08f689
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
grub2_2.02+dfsg1.orig.tar.xz
......
......@@ -9,6 +9,10 @@ grub2 (2.02+dfsg1-11) UNRELEASED; urgency=medium
[ Steve McIntyre ]
* Make grub-efi-amd64-signed recommend shim-signed (closes: #919067).
[ Jeroen Dekkers ]
* Initialize keyboard in at_keyboard module init if keyboard is ready
(closes: #741464).
[ Debconf translations ]
* [de] German (Helge Kreutzmann and Holger Wansing; closes: #921018).
......
From 2457fd63704a5e9da241579618b9ac3a6f08f689 Mon Sep 17 00:00:00 2001
From: Jeroen Dekkers <jeroen@dekkers.ch>
Date: Sat, 12 Jan 2019 21:02:18 +0100
Subject: at_keyboard: initialize keyboard in module init if keyboard is ready
The change in 0c62a5b2 caused at_keyboard to fail on some
machines. Immediately initializing the keyboard in the module init if
the keyboard is ready makes the problem go away.
Bug-Debian: https://bugs.debian.org/741464
Last-Update: 2019-02-09
Patch-Name: at-keyboard-module-init.patch
---
grub-core/term/at_keyboard.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
index b4ea9ff7e..d3fef0b67 100644
--- a/grub-core/term/at_keyboard.c
+++ b/grub-core/term/at_keyboard.c
@@ -607,6 +607,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
}
}
+static grub_err_t
+grub_keyboard_controller_mod_init (struct grub_term_input *term __attribute__ ((unused))) {
+ if (KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
+ grub_keyboard_controller_init ();
+
+ return GRUB_ERR_NONE;
+}
+
static void
grub_keyboard_controller_init (void)
{
@@ -677,6 +685,7 @@ grub_at_restore_hw (void)
static struct grub_term_input grub_at_keyboard_term =
{
.name = "at_keyboard",
+ .init = grub_keyboard_controller_mod_init,
.fini = grub_keyboard_controller_fini,
.getkey = grub_at_keyboard_getkey
};
......@@ -122,3 +122,4 @@ xen-pvh-install.patch
xen-pvh-configure.patch
mkimage-simplify-header-size-logic.patch
mkimage-arm64-efi-align-first-section-to-page.patch
at-keyboard-module-init.patch
......@@ -607,6 +607,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
}
}
static grub_err_t
grub_keyboard_controller_mod_init (struct grub_term_input *term __attribute__ ((unused))) {
if (KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
grub_keyboard_controller_init ();
return GRUB_ERR_NONE;
}
static void
grub_keyboard_controller_init (void)
{
......@@ -677,6 +685,7 @@ grub_at_restore_hw (void)
static struct grub_term_input grub_at_keyboard_term =
{
.name = "at_keyboard",
.init = grub_keyboard_controller_mod_init,
.fini = grub_keyboard_controller_fini,
.getkey = grub_at_keyboard_getkey
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment