From patchwork Thu Apr 7 16:50:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8774921 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 19BDC9F3D1 for ; Thu, 7 Apr 2016 16:51:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7FB4B20212 for ; Thu, 7 Apr 2016 16:51:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D1BC200BE for ; Thu, 7 Apr 2016 16:51:00 +0000 (UTC) Received: from localhost ([::1]:51410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoD91-0003YV-GP for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Apr 2016 12:50:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoD8t-0003Xw-AA for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoD8r-0001YW-Mm for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:50:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoD8r-0001YR-H2 for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:50:49 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE0E0710A4; Thu, 7 Apr 2016 16:50:48 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-50.ams2.redhat.com [10.36.112.50]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u37GojrG011150; Thu, 7 Apr 2016 12:50:47 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Apr 2016 18:50:31 +0200 Message-Id: <1460047845-14488-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1460047845-14488-1-git-send-email-pbonzini@redhat.com> References: <1460047845-14488-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 07 Apr 2016 16:50:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PULL 01/15] ps2kbd: default to scancode_set 2, as with KBD_CMD_RESET X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hervé Poussineau This line has been added in commit ef74679a810fe6858f625b9d52b68cc3fc61eb3d 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 overwriting the current scancode set with the one it wants. This fixes IBM 40p firmware, which doesn't bother sending KBD_CMD_RESET or KBD_CMD_SCANCODE. Signed-off-by: Hervé Poussineau Message-Id: <1458714100-28885-1-git-send-email-hpoussin@reactos.org> Signed-off-by: Paolo Bonzini --- hw/input/ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = 0; s->translate = 0; - s->scancode_set = 0; + s->scancode_set = 2; } static void ps2_mouse_reset(void *opaque)