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 v5 3/6] ps2: accept 'Set Key Make and Break' commands
Date: Fri, 20 Dec 2019 22:15:09 +0100	[thread overview]
Message-ID: <20191220211512.3289-4-svens@stackframe.org> (raw)
In-Reply-To: <20191220211512.3289-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 | 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 mode */
 
 /* 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 = 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 = -1;
+        break;
     case KBD_CMD_SCANCODE:
         if (val == 0) {
             if (s->common.queue.count <= PS2_QUEUE_SIZE - 2) {
-- 
2.24.0



  parent reply	other threads:[~2019-12-20 21:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 21:15 [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 1/6] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2020-02-12 23:37   ` Philippe Mathieu-Daudé
2020-02-13 22:59     ` Philippe Mathieu-Daudé
2019-12-20 21:15 ` [PATCH v5 2/6] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-12-20 21:15 ` Sven Schnelle [this message]
2019-12-20 21:15 ` [PATCH v5 4/6] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2020-01-03  6:15   ` Philippe Mathieu-Daudé
2020-01-19 17:22     ` Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 5/6] hppa: Add emulation of Artist graphics Sven Schnelle
2019-12-22 12:37   ` Philippe Mathieu-Daudé
2019-12-23 17:50     ` Sven Schnelle
2019-12-24  0:18       ` Philippe Mathieu-Daudé
2019-12-27 20:57         ` Helge Deller
2019-12-29 23:15           ` Philippe Mathieu-Daudé
2020-02-12 23:55   ` Philippe Mathieu-Daudé
2019-12-20 21:15 ` [PATCH v5 6/6] seabios-hppa: update to latest version Sven Schnelle
2019-12-22 12:33   ` Philippe Mathieu-Daudé
2019-12-21 22:22 ` [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Helge Deller
2019-12-21 22:24   ` [PATCH 1/2] hppa: Do not enable artist graphics with -nographic option Helge Deller
2019-12-22  8:39     ` Sven Schnelle
2019-12-22 10:22       ` Helge Deller
2019-12-29  1:25     ` Richard Henderson
2019-12-21 22:25   ` [PATCH 2/2] hppa: Switch to tulip NIC by default Helge Deller
2019-12-29  1:25     ` Richard Henderson
2019-12-29  1:25 ` [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Richard Henderson
2019-12-29 13:08   ` Helge Deller

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=20191220211512.3289-4-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).