From patchwork Sun Oct 20 20:47:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 1180080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=stackframe.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=duncanthrax.net header.i=@duncanthrax.net header.b="LotMt8nY"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46xBjn2yMcz9sP6 for ; Mon, 21 Oct 2019 07:50:21 +1100 (AEDT) Received: from localhost ([::1]:47386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMI9b-000681-5g for incoming@patchwork.ozlabs.org; Sun, 20 Oct 2019 16:50:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52477) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMI6t-0003X0-8g for qemu-devel@nongnu.org; Sun, 20 Oct 2019 16:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMI6s-0001AO-3P for qemu-devel@nongnu.org; Sun, 20 Oct 2019 16:47:31 -0400 Received: from smtp.duncanthrax.net ([2001:470:70c5:1111::170]:43584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMI6r-00019o-Gy for qemu-devel@nongnu.org; Sun, 20 Oct 2019 16:47:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=tiTGDMHN1vZNDWvO4Ruj3FTopNbi9p5DHVfqGHj/pzc=; b=LotMt8nYeUSVADf55Co4GBeSe5 szLcpj/2sVqHnaRaVI4atTzzFWCogsZb+qmFLp2lT71hxHPtUfDVrUC878L8o11y86DPGHUQevJIt EjQy5TdK8eFQVucU+EAZTLln7yDR0U14Yy/SgTDIYr9yabSrltuQF/RsAVkD6iKDs4fw=; Received: from hsi-kbw-046-005-233-221.hsi8.kabel-badenwuerttemberg.de ([46.5.233.221] helo=x280.stackframe.org) by smtp.eurescom.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iMI6q-0002cH-5x; Sun, 20 Oct 2019 22:47:28 +0200 From: Sven Schnelle To: Richard Henderson Subject: [PATCH 4/7] ps2: accept 'Set Key Make and Break' commands Date: Sun, 20 Oct 2019 22:47:21 +0200 Message-Id: <20191020204724.31537-5-svens@stackframe.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191020204724.31537-1-svens@stackframe.org> References: <20191020204724.31537-1-svens@stackframe.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:70c5:1111::170 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , Sven Schnelle , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" HP-UX sends both the 'Set key make and break (0xfc) and 'Set all key typematic make and break' (0xfa). QEMU response with 'Resend' as it doesn't handle these commands. HP-UX than reports an PS/2 max retransmission exceeded error. Add these commands and just reply with ACK. Signed-off-by: Sven Schnelle --- hw/input/ps2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 67f92f6112..6c2c7066a6 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -49,6 +49,8 @@ #define KBD_CMD_RESET_DISABLE 0xF5 /* reset and disable scanning */ #define KBD_CMD_RESET_ENABLE 0xF6 /* reset and enable scanning */ #define KBD_CMD_RESET 0xFF /* Reset */ +#define KBD_CMD_SET_MAKE_BREAK 0xFC /* Set Make and Break mode */ +#define KBD_CMD_SET_TYPEMATIC 0xFA /* Set Typematic Make and Break mode */ /* Keyboard Replies */ #define KBD_REPLY_POR 0xAA /* Power on reset */ @@ -592,6 +594,10 @@ void ps2_write_keyboard(void *opaque, int val) KBD_REPLY_ACK, KBD_REPLY_POR); break; + case KBD_CMD_SET_TYPEMATIC: + case KBD_CMD_SET_MAKE_BREAK: + ps2_queue(&s->common, KBD_REPLY_ACK); + break; default: ps2_queue(&s->common, KBD_REPLY_RESEND); break;