From 8be449bc899478348ba1fe0fbf999c502e65f7a4 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 2 Mar 2010 11:53:35 -0300
Subject: [PATCH 39/42] kbd leds: ps/2 kbd

RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <1267530817-20015-3-git-send-email-kraxel@redhat.com>
Patchwork-id: 7391
O-Subject: [RHEL-6 kvm PATCH 2/4] kbd leds: ps/2 kbd
Bugzilla: 569767
RH-Acked-by: Zachary Amsden <zamsden@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>

upstream: submitted: http://patchwork.ozlabs.org/patch/46354/

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/ps2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/ps2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/ps2.c b/hw/ps2.c
index 15a6650..f0b206a 100644
--- 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;
-- 
1.6.3.rc4.29.g8146

