qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Sven Schnelle <svens@stackframe.org>
Subject: [PULL 03/11] ps2: accept 'Set Key Make and Break' commands
Date: Tue, 21 Jan 2020 16:32:48 -1000	[thread overview]
Message-ID: <20200122023256.27556-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20200122023256.27556-1-richard.henderson@linaro.org>

From: Sven Schnelle <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>
Message-Id: <20191220211512.3289-4-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.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.20.1



  parent reply	other threads:[~2020-01-22  2:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  2:32 [PULL 00/11] target/hppa patch queue Richard Henderson
2020-01-22  2:32 ` [PULL 01/11] hw/hppa/dino.c: Improve emulation of Dino PCI chip Richard Henderson
2020-01-22  2:32 ` [PULL 02/11] hppa: Add support for LASI chip with i82596 NIC Richard Henderson
2020-01-22  2:32 ` Richard Henderson [this message]
2020-01-22  2:32 ` [PULL 04/11] hppa: add emulation of LASI PS2 controllers Richard Henderson
2020-01-22  2:32 ` [PULL 05/11] hppa: Switch to tulip NIC by default Richard Henderson
2020-01-22  2:32 ` [PULL 06/11] seabios-hppa: update to latest version Richard Henderson
2020-01-22  2:32 ` [PULL 07/11] hppa: Add emulation of Artist graphics Richard Henderson
2020-01-22  2:32 ` [PULL 08/11] hw/hppa/machine: Correctly check the firmware is in PDC range Richard Henderson
2020-01-22  2:32 ` [PULL 09/11] hw/hppa/machine: Restrict the total memory size to 3GB Richard Henderson
2020-01-22  2:32 ` [PULL 10/11] hw/hppa/machine: Map the PDC memory region with higher priority Richard Henderson
2020-01-22  2:32 ` [PULL 11/11] target/hppa: Allow, but diagnose, LDCW aligned only mod 4 Richard Henderson
2020-01-22  2:47 ` [PULL 00/11] target/hppa patch queue Richard Henderson
2020-01-22 23:28   ` Philippe Mathieu-Daudé
2020-01-22 23:34     ` Philippe Mathieu-Daudé
2020-01-22 23:59       ` Philippe Mathieu-Daudé
2020-01-22  3:34 ` no-reply
2020-01-22 14:40   ` 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=20200122023256.27556-4-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=svens@stackframe.org \
    /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).