From 24f0d39a6c367b6f2aeeee1340e76b7ca9d4b0dd Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 22 Feb 2013 11:39:13 +0100 Subject: [PATCH] uhci controller : use new -device syntax 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 --- PVE/QemuServer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 14735d22..fc46d4e9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -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 },