Set the leds and drain the input buffer in at_keyboard initialisation

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-22 18:15:27 +02:00
parent 6e05e7f0f8
commit f582367ecf

View file

@ -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;
}