[PATCH 2/2] virt: Fix usb_stick block device subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Add ehci controller when usbstick is selected
* Add default number of usb_max_port

With those mini-changes it's possible to run every test with usb_stick
block device without further test/cfg modifications.

Signed-off-by: Lukas Doktor <ldoktor@xxxxxxxxxx>
---
 client/virt/guest-hw.cfg.sample |    2 ++
 client/virt/kvm_vm.py           |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/client/virt/guest-hw.cfg.sample b/client/virt/guest-hw.cfg.sample
index 0729117..655ac9b 100644
--- a/client/virt/guest-hw.cfg.sample
+++ b/client/virt/guest-hw.cfg.sample
@@ -71,6 +71,8 @@ variants:
         cd_format=ahci
     - usb_stick:
         drive_format=usb2
+        usbs += " default-ehci"
+        usb_type_default-ehci = usb-ehci
     - usb_cdrom:
         cd_format=usb2
     - xenblk:
diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
index cbc0494..32d7330 100644
--- a/client/virt/kvm_vm.py
+++ b/client/virt/kvm_vm.py
@@ -238,7 +238,7 @@ class VM(virt_vm.BaseVM):
                 usb_dev = self.usb_dev_dict.get(usb)
 
                 controller = usb
-                max_port = int(usb_params.get("usb_max_port"))
+                max_port = int(usb_params.get("usb_max_port", 6))
                 if len(usb_dev) < max_port:
                     bus = "%s.0" % usb
                     self.usb_dev_dict[usb].append(dev)
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux