From: Sven Schnelle <svens@stackframe.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Helge Deller <deller@gmx.de>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v3 3/6] ps2: accept 'Set Key Make and Break' commands
Date: Wed, 23 Oct 2019 14:08:44 +0200 [thread overview]
Message-ID: <20191023120844.GA22554@stackframe.org> (raw)
In-Reply-To: <c0a0c73a-496f-e6bc-54ce-a6631ef3a81d@redhat.com>
Hi Philippe,
On Wed, Oct 23, 2019 at 01:08:35PM +0200, Philippe Mathieu-Daudé wrote:
> Hi Sven,
>
> (Please Cc reviewers who previously commented your patch)
>
> On 10/22/19 10:59 PM, Sven Schnelle wrote:
> > 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:
>
> OK
>
> > 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);
>
> I'm not sure, can't this loop?
I don't see how?
> Can you fold it with the '0x00' case?
Ok.
> > + break;
> > default:
> > ps2_queue(&s->common, KBD_REPLY_RESEND);
> > break;
> > }
> > break;
> > + case KBD_CMD_SET_MAKE_BREAK:
>
> We can reorder this one in the same case with:
>
> case KBD_CMD_SET_LEDS:
> case KBD_CMD_SET_RATE:
Ok.
> > + 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) {
> >
>
Regards
Sven
next prev parent reply other threads:[~2019-10-23 12:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 20:59 [PATCH v3 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 1/6] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 2/6] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 3/6] ps2: accept 'Set Key Make and Break' commands Sven Schnelle
2019-10-23 11:08 ` Philippe Mathieu-Daudé
2019-10-23 12:08 ` Sven Schnelle [this message]
2019-10-23 12:32 ` Philippe Mathieu-Daudé
2019-10-22 20:59 ` [PATCH v3 4/6] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 5/6] hppa: Add emulation of Artist graphics Sven Schnelle
2019-10-24 20:51 ` Mark Cave-Ayland
2019-10-25 9:31 ` Sven Schnelle
2019-10-26 9:35 ` Mark Cave-Ayland
2019-10-26 17:54 ` Sven Schnelle
2019-11-01 21:59 ` Sven Schnelle
2019-11-03 20:56 ` Mark Cave-Ayland
2019-11-03 21:03 ` Sven Schnelle
2019-10-26 11:43 ` 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=20191023120844.GA22554@stackframe.org \
--to=svens@stackframe.org \
--cc=deller@gmx.de \
--cc=philmd@redhat.com \
--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).