From: Igor Mammedov <imammedo@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] [PV Xen] Mouse stuck after save/restore of guest.
Date: Thu, 14 Apr 2011 17:45:07 +0200 [thread overview]
Message-ID: <1302795907-321-1-git-send-email-imammedo@redhat.com> (raw)
Mouse stuck after restore of PV guest but buttons are
in working condition.
If driver has been configured for ABS coordinates at
start it will get XENKBD_TYPE_POS events and then
suddenly after restore it'll start getting
XENKBD_TYPE_MOTION events, that will be dropped later
and they won't get into user-space.
Regression was introduced by hunk 5 and 6 of 5ea5254
in upstream.
Driver on restore should ask xen for request-abs-pointer
again if it's available. So restore parts that did it
before 5ea5254.
---
drivers/input/xen-kbdfront.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
index 53e6273..71e2fc5 100644
--- a/drivers/input/xen-kbdfront.c
+++ b/drivers/input/xen-kbdfront.c
@@ -286,7 +286,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
enum xenbus_state backend_state)
{
struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
- int val;
+ int ret, val;
switch (backend_state) {
case XenbusStateInitialising:
@@ -299,6 +299,18 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
case XenbusStateInitWait:
InitWait:
+ ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+ "feature-abs-pointer", "%d", &val);
+ if (ret < 0)
+ val = 0;
+ if (val) {
+ ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
+ "request-abs-pointer", "1");
+ if (ret)
+ printk(KERN_WARNING
+ "xenkbd: can't request abs-pointer");
+ }
+
xenbus_switch_state(dev, XenbusStateConnected);
break;
--
1.7.1
next reply other threads:[~2011-04-14 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 15:45 Igor Mammedov [this message]
2011-04-14 15:59 ` [PATCH] [PV Xen] Mouse stuck after save/restore of guest Konrad Rzeszutek Wilk
2011-04-14 17:26 ` Olaf Hering
2011-04-14 18:38 ` Konrad Rzeszutek Wilk
2011-04-15 9:37 ` [Xen-devel] " Olaf Hering
2011-04-19 13:46 ` Konrad Rzeszutek Wilk
2011-04-19 14:55 ` Olaf Hering
2011-04-20 9:19 ` Igor Mammedov
2011-04-20 18:29 ` [PATCH] [PV Xen] Mouse stuck after save/restore of guest. - stable tree candidate Konrad Rzeszutek Wilk
2011-04-27 16:31 ` [Xen-devel] " Olaf Hering
2011-04-27 23:32 ` [stable] " Greg KH
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=1302795907-321-1-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=xen-devel@lists.xensource.com \
/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).