|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix suspend/resume for domains with devices which are in
# 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 <=
|
|
|
|
|