summaryrefslogtreecommitdiffstats
path: root/debian/patches/at_keyboard-module-init.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
commit8e67fbf68ffeb9eb5f026dd482d73b021660bf9b (patch)
treebb573facd5d02096f9956b2617a722b88acaa8af /debian/patches/at_keyboard-module-init.patch
parentAdding upstream version 2.06. (diff)
downloadgrub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.tar.xz
grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.zip
Adding debian version 2.06-3~deb11u6.debian/2.06-3_deb11u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/at_keyboard-module-init.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/at_keyboard-module-init.patch b/debian/patches/at_keyboard-module-init.patch
new file mode 100644
index 0000000..deb713d
--- /dev/null
+++ b/debian/patches/at_keyboard-module-init.patch
@@ -0,0 +1,44 @@
+From e619f11201a4d93ce36d384221c899f88f7618c9 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 597111077..beb007002 100644
+--- a/grub-core/term/at_keyboard.c
++++ b/grub-core/term/at_keyboard.c
+@@ -244,6 +244,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
+ return ret;
+ }
+
++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)
+ {
+@@ -314,6 +322,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
+ };