From: Gerd Hoffmann <kraxel@redhat.com>
To: geoff@hostfission.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] ps2: Clear the queue on PS/2 mouse reset and obey device disable
Date: Mon, 7 May 2018 14:21:47 +0200 [thread overview]
Message-ID: <20180507122147.vvz4drashaxdoo7j@sirius.home.kraxel.org> (raw)
In-Reply-To: <fe730863e2af01b68c7086f2f1f74220@hostfission.com>
On Mon, May 07, 2018 at 10:00:22PM +1000, geoff--- via Qemu-devel wrote:
> This allows guest's to correctly reinitialize and identify the mouse
> should the guest decide to re-scan or reset during mouse input events.
>
> Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
> ---
> hw/input/ps2.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/input/ps2.c b/hw/input/ps2.c
> index 06f5d2ac4a..6edf046820 100644
> --- a/hw/input/ps2.c
> +++ b/hw/input/ps2.c
> @@ -673,6 +673,9 @@ static void ps2_mouse_sync(DeviceState *dev)
> {
> PS2MouseState *s = (PS2MouseState *)dev;
>
> + if (!(s->mouse_status & MOUSE_STATUS_ENABLED))
> + return;
> +
Why this is needed?
> @@ -776,6 +779,7 @@ void ps2_write_mouse(void *opaque, int val)
> s->mouse_resolution = 2;
> s->mouse_status = 0;
> s->mouse_type = 0;
> + ps2_reset_queue(&s->common);
Looks good.
cheers,
Gerd
next prev parent reply other threads:[~2018-05-07 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 12:00 [Qemu-devel] [PATCH 1/2] ps2: Clear the queue on PS/2 mouse reset and obey device disable geoff
2018-05-07 12:21 ` Gerd Hoffmann [this message]
2018-05-07 12:26 ` geoff
2018-05-07 12:41 ` Gerd Hoffmann
2018-05-07 12:42 ` geoff
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=20180507122147.vvz4drashaxdoo7j@sirius.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=geoff@hostfission.com \
--cc=qemu-devel@nongnu.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).