From: Vladimir 'phcoder' Serbinenko Date: Sun, 22 Aug 2010 16:15:27 +0000 (+0200) Subject: Set the leds and drain the input buffer in at_keyboard initialisation X-Git-Tag: 1.99~488^2~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f582367ecff67c616b5631331812d87ed5e67fdf;p=thirdparty%2Fgrub.git Set the leds and drain the input buffer in at_keyboard initialisation --- diff --git a/term/at_keyboard.c b/term/at_keyboard.c index 4213b29db..06d545d74 100644 --- a/term/at_keyboard.c +++ b/term/at_keyboard.c @@ -223,6 +223,11 @@ grub_keyboard_controller_init (struct grub_term_input *term __attribute__ ((unus at_keyboard_status = 0; grub_keyboard_controller_orig = grub_keyboard_controller_read (); grub_keyboard_controller_write (grub_keyboard_controller_orig | KEYBOARD_SCANCODE_SET1); + keyboard_controller_led (led_status); + /* Drain input buffer. */ + while (KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS))) + grub_inb (KEYBOARD_REG_DATA); + return GRUB_ERR_NONE; }