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-changelog

[Xen-changelog] Fix suspend/resume for domains with devices which are in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix suspend/resume for domains with devices which are in xenstore but have no xenbus aware driver.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Aug 2005 09:06:11 -0400
Delivery-date: Fri, 19 Aug 2005 13:06:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 188c782fa9bbde655186380894fb35a89c9ba102
# Parent  bf1746842c46602fae0b17af7c5a012b064ffae8
Fix suspend/resume for domains with devices which are in xenstore but have no 
xenbus aware driver.
Information about network devices is stored in xenstore.  Xenbus creates
device objects for these devices but the network driver doesn't support
finding devices over xenbus yet and thus these devices have no driver.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r bf1746842c46 -r 188c782fa9bb 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Fri Aug 19 
12:22:27 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Fri Aug 19 
13:05:31 2005
@@ -531,10 +531,13 @@
 static int suspend_dev(struct device *dev, void *data)
 {
        int err = 0;
-       struct xenbus_driver *drv = to_xenbus_driver(dev->driver);
-       struct xenbus_device *xdev
-               = container_of(dev, struct xenbus_device, dev);
-
+       struct xenbus_driver *drv;
+       struct xenbus_device *xdev;
+
+       if (dev->driver == NULL)
+               return 0;
+       drv = to_xenbus_driver(dev->driver);
+       xdev = container_of(dev, struct xenbus_device, dev);
        if (drv->suspend)
                err = drv->suspend(xdev);
        if (err)
@@ -545,10 +548,13 @@
 static int resume_dev(struct device *dev, void *data)
 {
        int err = 0;
-       struct xenbus_driver *drv = to_xenbus_driver(dev->driver);
-       struct xenbus_device *xdev
-               = container_of(dev, struct xenbus_device, dev);
-
+       struct xenbus_driver *drv;
+       struct xenbus_device *xdev;
+
+       if (dev->driver == NULL)
+               return 0;
+       drv = to_xenbus_driver(dev->driver);
+       xdev = container_of(dev, struct xenbus_device, dev);
        if (drv->resume)
                err = drv->resume(xdev);
        if (err)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix suspend/resume for domains with devices which are in xenstore but have no xenbus aware driver., Xen patchbot -unstable <=