kbd leds: ps/2 kbd
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 26 Feb 2010 16:17:37 +0000 (17:17 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 9 Mar 2010 14:47:20 +0000 (08:47 -0600)
Add led status notification support to the ps/2 kbd driver.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/ps2.c

index 15a6650..f0b206a 100644 (file)
--- a/hw/ps2.c
+++ b/hw/ps2.c
@@ -185,6 +185,7 @@ static void ps2_reset_keyboard(PS2KbdState *s)
 {
     s->scan_enabled = 1;
     s->scancode_set = 2;
+    kbd_put_ledstate(0);
 }
 
 void ps2_write_keyboard(void *opaque, int val)
@@ -259,6 +260,7 @@ void ps2_write_keyboard(void *opaque, int val)
         s->common.write_cmd = -1;
         break;
     case KBD_CMD_SET_LEDS:
+        kbd_put_ledstate(val);
         ps2_queue(&s->common, KBD_REPLY_ACK);
         s->common.write_cmd = -1;
         break;