2.6.35.12 Version

Please apply the upstream git commit c36b58e8a9112017c2bcc322cc98e71241814303
(Input: xen-kbdfront - fix mouse getting stuck after save/restore)
which fixes a regression introduced by 8c3c283e6bf463ab498d6e7823aff6c4762314b6
(Input: xen-kbdfront - advertise either absolute or relative coordinates)

commit c36b58e8a9112017c2bcc322cc98e71241814303
Author: Igor Mammedov <[email protected]>
Date:   Mon Apr 18 10:17:17 2011 -0700

    Input: xen-kbdfront - fix mouse getting stuck after save/restore

    Mouse gets "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
    5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db
    ("Input: xen-kbdfront - advertise either absolute or relative
    coordinates").

    Driver on restore should ask xen for request-abs-pointer again if it is
    available. So restore parts that did it before 5ea5254.

    Acked-by: Olaf Hering <[email protected]>
    Signed-off-by: Igor Mammedov <[email protected]>
    [v1: Expanded the commit description]
    Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>
---
 drivers/input/xen-kbdfront.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Index: linux-2.6.35.12/drivers/input/xen-kbdfront.c
===================================================================
--- linux-2.6.35.12.orig/drivers/input/xen-kbdfront.c
+++ linux-2.6.35.12/drivers/input/xen-kbdfront.c
@@ -285,7 +285,7 @@ static void xenkbd_backend_changed(struc
                                   enum xenbus_state backend_state)
 {
        struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
-       int val;
+       int ret, val;
 
        switch (backend_state) {
        case XenbusStateInitialising:
@@ -296,6 +296,17 @@ static void xenkbd_backend_changed(struc
 
        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;
 

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to