qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Helge Deller <deller@gmx.de>,
	Sven Schnelle <svens@stackframe.org>,
	qemu-devel@nongnu.org
Subject: [PATCH 4/7] ps2: accept 'Set Key Make and Break' commands
Date: Sun, 20 Oct 2019 22:47:21 +0200	[thread overview]
Message-ID: <20191020204724.31537-5-svens@stackframe.org> (raw)
In-Reply-To: <20191020204724.31537-1-svens@stackframe.org>

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 <svens@stackframe.org>
---
 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;
-- 
2.23.0



  parent reply	other threads:[~2019-10-20 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20 20:47 [PATCH 0/7] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-10-20 20:47 ` [PATCH 1/7] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2019-10-21 18:26   ` Richard Henderson
2019-10-20 20:47 ` [PATCH 2/7] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-10-20 20:47 ` [PATCH 3/7] hppa: remove ISA region Sven Schnelle
2019-10-21 18:17   ` Richard Henderson
2019-10-21 20:58     ` Sven Schnelle
2019-10-20 20:47 ` Sven Schnelle [this message]
2019-10-20 20:47 ` [PATCH 5/7] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2019-10-20 20:47 ` [PATCH 6/7] hppa: Add emulation of Artist graphics Sven Schnelle
     [not found] ` <20191020204724.31537-8-svens@stackframe.org>
2019-10-21 11:24   ` [PATCH 7/7] seabios-hppa: update to latest version Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191020204724.31537-5-svens@stackframe.org \
    --to=svens@stackframe.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).