]> git.proxmox.com Git - qemu-server.git/commitdiff
uhci controller : use new -device syntax
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 22 Feb 2013 10:39:13 +0000 (11:39 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Feb 2013 10:52:23 +0000 (11:52 +0100)
we need an id to allow hotplug

info pci before
---------------
  Bus  0, device   1, function 2:
    USB controller: PCI device 8086:7020
      IRQ 11.
      BAR4: I/O at 0xc040 [0xc05f].
      id ""

info pci after
--------------
  Bus  0, device   1, function 2:
    USB controller: PCI device 8086:7020
      IRQ 11.
      BAR4: I/O at 0xc040 [0xc05f].
      id "uhci"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index 14735d228bf8a225ec442adef9647ab128c6ca49..fc46d4e9527bd6bf8e01ced595777e1cbcda0974 100644 (file)
@@ -2192,6 +2192,9 @@ sub config_to_command {
 
     push @$cmd, '-daemonize';
 
+    $pciaddr = print_pci_addr("piix3", $bridges);
+    push @$devices, '-device', "piix3-usb-uhci,id=uhci$pciaddr.0x2";
+
     my $use_usb2 = 0;
     for (my $i = 0; $i < $MAX_USB_DEVICES; $i++)  {
        next if !$conf->{"usb$i"};
@@ -3356,7 +3359,7 @@ sub print_pci_addr {
 
     my $res = '';
     my $devices = {
-       #addr1 : ide,parallel,serial (motherboard)
+       piix3 => { bus => 0, addr => 1 },
        #addr2 : first videocard
        balloon0 => { bus => 0, addr => 3 },
        watchdog => { bus => 0, addr => 4 },