[pve-devel] [PATCH 2/2] usb-tablet : always use uhci controller

Alexandre Derumier aderumier at odiso.com
Fri Feb 22 11:39:14 CET 2013


- usb-tablet on ehci is buggy
- convert to -device syntax

info usb before
----------------
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet

info usb after
--------------
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index fc46d4e..6bab016 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2205,13 +2205,7 @@ sub config_to_command {
 
     # enable absolute mouse coordinates (needed by vnc)
     my $tablet = defined($conf->{tablet}) ? $conf->{tablet} : $defaults->{tablet};
-    if ($tablet) {
-	if ($use_usb2) {
-	    push @$devices, '-device', 'usb-tablet,bus=ehci.0,port=6';
-	} else {
-	    push @$devices, '-usbdevice', 'tablet';
-	}
-    }
+    push @$devices, '-device', 'usb-tablet,id=tablet,bus=uhci.0,port=1' if $tablet;
 
     # host pci devices
     for (my $i = 0; $i < $MAX_HOSTPCI_DEVICES; $i++)  {
@@ -2529,7 +2523,7 @@ sub vm_deviceplug {
     return 1 if !check_running($vmid);
 
     if ($deviceid eq 'tablet') {
-	my $devicefull = "usb-tablet,id=tablet,bus=ehci.0,port=6";
+	my $devicefull = "usb-tablet,id=tablet,bus=uhci.0,port=1";
 	qemu_deviceadd($vmid, $devicefull);
 	return 1;
     }
-- 
1.7.10.4




More information about the pve-devel mailing list