WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] del xend entry when destroy pv usb host controller o

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] del xend entry when destroy pv usb host controller of a guest os with no pv-frontend driver
From: "James (song wei)" <jsong@xxxxxxxxxx>
Date: Thu, 25 Mar 2010 23:31:29 -0700 (PDT)
Delivery-date: Thu, 25 Mar 2010 23:32:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
delete xend entry when destroying pv usb host controller of a guest os which
has no pv-frontend driver loaded.

-James (Song Wei)

Signed-off-by: James (Song Wei) <jsong@xxxxxxxxxx>

diff -r f42ff98a2cdc tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Mar 25 09:32:21 2010
+0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Mar 26 13:27:25 2010
+0800
@@ -1305,8 +1305,15 @@
                 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


http://old.nabble.com/file/p28038630/del_usb_xend_entry.patch
del_usb_xend_entry.patch 
-- 
View this message in context: 
http://old.nabble.com/-PATCH--del-xend-entry-when-destroy-pv-usb-host-controller-of-a-guest-os-with-no-pv-frontend-driver-tp28038630p28038630.html
Sent from the Xen - Dev mailing list archive at Nabble.com.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] del xend entry when destroy pv usb host controller of a guest os with no pv-frontend driver, James (song wei) <=