Received: from eggs.gnu.org ([2001:4830:134:3::10]:35117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an9aM-0004qB-AJ for qemu-devel@nongnu.org; Mon, 04 Apr 2016 14:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an9aH-00030D-Qb for qemu-devel@nongnu.org; Mon, 04 Apr 2016 14:50:50 -0400 Date: Mon, 4 Apr 2016 15:50:41 -0300 From: Eduardo Habkost Message-ID: <20160404185041.GC22665@thinpad.lan.raisama.net> References: <1458714100-28885-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1458714100-28885-1-git-send-email-hpoussin@reactos.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] ps2kbd: default to scancode_set 2, as with KBD_CMD_RESET List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Herv=E9?= Poussineau Cc: qemu-trivial@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Richard Henderson On Wed, Mar 23, 2016 at 07:21:40AM +0100, Herv=E9 Poussineau wrote: > This line has been added in commit ef74679a810fe6858f625b9d52b68cc3fc61= eb3d with > other initializations. However, scancode set 0 doesn't exist (only 1, 2= , 3). > This works well as long as operating system is resetting keyboard, or o= verwriting > the current scancode set with the one it wants. >=20 > This fixes IBM 40p firmware, which doesn't bother sending KBD_CMD_RESET= or KBD_CMD_SCANCODE. >=20 > Signed-off-by: Herv=E9 Poussineau Matches reset behavior documented at http://www.computer-engineering.org/ps2keyboard/ (the best source I could find for the PS/2 specs). Reviewed-by: Eduardo Habkost Michael, do you want to merge this through the PC tree? > --- > hw/input/ps2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/hw/input/ps2.c b/hw/input/ps2.c > index 58892d5..a8aa36f 100644 > --- a/hw/input/ps2.c > +++ b/hw/input/ps2.c > @@ -628,7 +628,7 @@ static void ps2_kbd_reset(void *opaque) > ps2_common_reset(&s->common); > s->scan_enabled =3D 0; > s->translate =3D 0; > - s->scancode_set =3D 0; > + s->scancode_set =3D 2; > } > =20 > static void ps2_mouse_reset(void *opaque) > --=20 > 2.1.4 >=20 --=20 Eduardo