xen/del_usb_xend_entry.patch
Charles Arnold 0c76f22ef1 - Update to Xen 4.0.2 rc2-pre, changeset 21443
- bnc#633573 - System fail to boot after running several warm
  reboot tests
  22749-vtd-workarounds.patch
- Upstream patches from Jan
  22744-ept-pod-locking.patch
  22777-vtd-ats-fixes.patch
  22781-pod-hap-logdirty.patch
  22782-x86-emul-smsw.patch
  22789-i386-no-x2apic.patch
  22790-svm-resume-migrate-pirqs.patch
  22816-x86-pirq-drop-priv-check.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=94
2011-02-04 21:19:54 +00:00

23 lines
1.4 KiB
Diff

Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1312,8 +1312,15 @@ class XendDomainInfo:
frontpath = self.getDeviceController(deviceClass).frontendPath(dev)
backpath = xstransact.Read(frontpath, "backend")
thread.start_new_thread(self.getDeviceController(deviceClass).finishDeviceCleanup, (backpath, path))
-
- rc = self.getDeviceController(deviceClass).destroyDevice(devid, force)
+ if deviceClass =='vusb':
+ dev = self.getDeviceController(deviceClass).convertToDeviceNumber(devid)
+ state = self.getDeviceController(deviceClass).readBackend(dev, 'state')
+ if state == '1':
+ rc = self.getDeviceController(deviceClass).destroyDevice(devid, True)
+ else:
+ rc = self.getDeviceController(deviceClass).destroyDevice(devid, force)
+ else:
+ rc = self.getDeviceController(deviceClass).destroyDevice(devid, force)
if not force and rm_cfg:
# The backend path, other than the device itself,
# has to be passed because its accompanied frontend