[pve-devel] [PATCH] usb-hid-fix-tablet-activation

Derumier Alexandre aderumier at odiso.com
Wed Feb 29 09:02:34 CET 2012


Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
 debian/patches/series                             |    1 +
 debian/patches/usb-hid-fix-tablet-activation.diff |   24 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/usb-hid-fix-tablet-activation.diff

diff --git a/debian/patches/series b/debian/patches/series
index d2988da..af0e823 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ keymap.diff
 set-max-nics.patch
 pve-auth.patch
 update-target-x86_64.conf-to-rhel6.2-version.patch
+usb-hid-fix-tablet-activation.diff
diff --git a/debian/patches/usb-hid-fix-tablet-activation.diff b/debian/patches/usb-hid-fix-tablet-activation.diff
new file mode 100644
index 0000000..c6ee81c
--- /dev/null
+++ b/debian/patches/usb-hid-fix-tablet-activation.diff
@@ -0,0 +1,24 @@
+Activate usb hid pointer devices (mouse+tablet) unconditionally
+on polls, even if we NAK the poll due to lack of new events.
+
+Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
+---
+ hw/usb-hid.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hw/usb-hid.c b/hw/usb-hid.c
+index 7fc0bd8..37bca78 100644
+--- a/hw/usb-hid.c
++++ b/hw/usb-hid.c
+@@ -466,6 +466,9 @@ static int usb_hid_handle_data(USBDevice *dev, USBPacket *p)
+     case USB_TOKEN_IN:
+         if (p->ep->nr == 1) {
+             int64_t curtime = qemu_get_clock_ns(vm_clock);
++            if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) {
++                hid_pointer_activate(hs);
++            }
+             if (!hid_has_events(hs) &&
+                 (!hs->idle || hs->next_idle_clock - curtime > 0)) {
+                 return USB_RET_NAK;
+-- 
+1.7.1
-- 
1.7.2.5




More information about the pve-devel mailing list