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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH 7 of 7] Add unsuspend hook for resuming devices in th

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 7 of 7] Add unsuspend hook for resuming devices in the checkpoint parent
From: Brendan Cully <brendan@xxxxxxxxx>
Date: 2007年1月15日 12:05:17 -0700
Delivery-date: 2007年1月15日 12:14:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1168891510@xxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168891374 28800
# Node ID 70508fff24c52b7b16ea6c7be630a43cca45a5e1
# Parent 1a3b78919a43a68948775eb4077f5dab62054f7c
Add unsuspend hook for resuming devices in the checkpoint parent.
Nothing uses it at the moment.
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
diff -r 1a3b78919a43 -r 70508fff24c5 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Mon Jan 15 
12:02:54 2007 -0800
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Mon Jan 15 
12:02:54 2007 -0800
@@ -672,6 +672,26 @@ static int suspend_dev(struct device *de
 return 0;
 }
 
+static int unsuspend_dev(struct device *dev, void *data)
+{
+ int err = 0;
+ struct xenbus_driver *drv;
+ struct xenbus_device *xdev;
+
+ DPRINTK("");
+
+ if (dev->driver == NULL)
+ return 0;
+ drv = to_xenbus_driver(dev->driver);
+ xdev = container_of(dev, struct xenbus_device, dev);
+ if (drv->unsuspend)
+ err = drv->unsuspend(xdev);
+ if (err)
+ printk(KERN_WARNING
+ "xenbus: unsuspend %s failed: %i\n", dev->bus_id, err);
+ return 0;
+}
+
 static int resume_dev(struct device *dev, void *data)
 {
 int err;
@@ -735,6 +755,9 @@ void xenbus_resume(int reconnect)
 
 if (reconnect) {
 bus_for_each_dev(&xenbus_frontend.bus, NULL, NULL, resume_dev);
+ } else {
+ bus_for_each_dev(&xenbus_frontend.bus, NULL, NULL,
+ unsuspend_dev);
 }
 xenbus_backend_resume(resume_dev);
 }
diff -r 1a3b78919a43 -r 70508fff24c5 linux-2.6-xen-sparse/include/xen/xenbus.h
--- a/linux-2.6-xen-sparse/include/xen/xenbus.h Mon Jan 15 12:02:54 2007 -0800
+++ b/linux-2.6-xen-sparse/include/xen/xenbus.h Mon Jan 15 12:02:54 2007 -0800
@@ -101,6 +101,7 @@ struct xenbus_driver {
 enum xenbus_state backend_state);
 int (*remove)(struct xenbus_device *dev);
 int (*suspend)(struct xenbus_device *dev);
+ int (*unsuspend)(struct xenbus_device *dev);
 int (*resume)(struct xenbus_device *dev);
 int (*uevent)(struct xenbus_device *, char **, int, char *, int);
 struct device_driver driver;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH 1 of 7] Add resumedomain domctl to resume a domain after checkpoint , Brendan Cully
Next by Date: [Xen-devel] xen test results on Unisys ES7000 , Krysan, Susan
Previous by Thread: [Xen-devel] [PATCH 1 of 7] Add resumedomain domctl to resume a domain after checkpoint , Brendan Cully
Next by Thread: [Xen-devel] Testing status of HVM (Intel VT) on 64bit XEN unstable c/s 13377 , Ed Smith
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /