From nobody Fri Dec 19 03:59:16 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1572815259; cv=none; d=zoho.com; s=zohoarc; b=UQ82kC34EBYvAK9yCh413k8YJ/BK5cjVuVwGiX1dfD5dKmgQpoSZVpFSkTrXDTnastd3pHbLE9KBF5j0QdrhQFcQ/3DWbvrEPc0K7C7GPNLFy0Pu+oWn8PZ46lJKPbmcopyoAtmpCdKPXvE3t49mrilhIlvum2FnNJoDM5wxteY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572815259; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EefOWIoMev6+YzZY396zyUnHP1z3a3a/9Q1IwlTCpj4=; b=VjBB0Q7KYOBJ01/Ee2pp3vqUUjHkFvq+wtTUDcFMMDpZX0MCtJX1rPOWOXvxUKOcGzoBgNcinJOD4Dg/1VIr9+jhpmp5o77nHpbTpIA0jM0jVHSEHMZZr/v8ZI6tY75N1iloTGx1EiCsKI/CX0b6JYW9nVo3vfPi/6t02U3OgKg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572815259816411.5549767644086; Sun, 3 Nov 2019 13:07:39 -0800 (PST) Received: from localhost ([::1]:56265 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRN61-0007Oh-H0 for importer@patchew.org; Sun, 03 Nov 2019 16:07:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51358) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRMv3-0008JG-Du for qemu-devel@nongnu.org; Sun, 03 Nov 2019 15:56:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRMv2-0002Jl-6g for qemu-devel@nongnu.org; Sun, 03 Nov 2019 15:56:17 -0500 Received: from shroom.duncanthrax.net ([2a01:4f8:121:41fa::169]:55757 helo=smtp.duncanthrax.net) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRMv2-0002IU-04 for qemu-devel@nongnu.org; Sun, 03 Nov 2019 15:56:16 -0500 Received: from hsi-kbw-046-005-233-221.hsi8.kabel-badenwuerttemberg.de ([46.5.233.221] helo=x280.stackframe.org) by smtp.duncanthrax.net with esmtpa (Exim 4.90_1) (envelope-from ) id 1iRMuz-00059W-EL; Sun, 03 Nov 2019 21:56:13 +0100 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:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EefOWIoMev6+YzZY396zyUnHP1z3a3a/9Q1IwlTCpj4=; b=XY8rPd6LlLml8TEuv33NcPFMLP cR3puDKdsaiSL/qFZVbErBq616vSQ7CpRS16AIvDKMYY/BKG6vI/xcgZTEYOQlno70tAxOZrKF7NF zFuslk3PrEGwrciSfaW5EyRRsE6hHVgltw9O6/yMKIHJhLNxWPBhAF9/zW+8Cv6ZdnQI=; From: Sven Schnelle To: Richard Henderson Subject: [PATCH v4 3/6] ps2: accept 'Set Key Make and Break' commands Date: Sun, 3 Nov 2019 21:56:04 +0100 Message-Id: <20191103205607.6590-4-svens@stackframe.org> X-Mailer: git-send-email 2.24.0.rc2 In-Reply-To: <20191103205607.6590-1-svens@stackframe.org> References: <20191103205607.6590-1-svens@stackframe.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:121:41fa::169 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 67f92f6112..0b671b6339 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 mo= de */ =20 /* Keyboard Replies */ #define KBD_REPLY_POR 0xAA /* Power on reset */ @@ -573,6 +575,7 @@ void ps2_write_keyboard(void *opaque, int val) case KBD_CMD_SCANCODE: case KBD_CMD_SET_LEDS: case KBD_CMD_SET_RATE: + case KBD_CMD_SET_MAKE_BREAK: s->common.write_cmd =3D val; ps2_queue(&s->common, KBD_REPLY_ACK); break; @@ -592,11 +595,18 @@ void ps2_write_keyboard(void *opaque, int val) KBD_REPLY_ACK, KBD_REPLY_POR); break; + case KBD_CMD_SET_TYPEMATIC: + ps2_queue(&s->common, KBD_REPLY_ACK); + break; default: ps2_queue(&s->common, KBD_REPLY_RESEND); break; } break; + case KBD_CMD_SET_MAKE_BREAK: + ps2_queue(&s->common, KBD_REPLY_ACK); + s->common.write_cmd =3D -1; + break; case KBD_CMD_SCANCODE: if (val =3D=3D 0) { if (s->common.queue.count <=3D PS2_QUEUE_SIZE - 2) { --=20 2.24.0.rc2