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] Added a hotplug KOBJ_OFFLINE call, for symmetry with the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added a hotplug KOBJ_OFFLINE call, for symmetry with the ONLINE call used here.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Nov 2005 21:00:06 +0000
Delivery-date: Wed, 23 Nov 2005 21:00:20 +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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID fb42478203b9453d5b7bb88d88753627c9e67be1
# Parent  17b98e15bf7821053992246c59701cd4dfd9553f
Added a hotplug KOBJ_OFFLINE call, for symmetry with the ONLINE call used here.
We need a hook to be able to close down the device properly, but the REMOVE
event is no good because we don't get the script and vif environment variables
set in that case.

Closes bug #417.
 
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 17b98e15bf78 -r fb42478203b9 
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Wed Nov 23 12:58:44 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Wed Nov 23 18:45:57 2005
@@ -216,13 +216,14 @@
                break;
 
        case XenbusStateClosed:
-               device_unregister(&be->dev->dev);
+               kobject_hotplug(&dev->dev.kobj, KOBJ_OFFLINE);
+               device_unregister(&dev->dev);
                break;
 
        case XenbusStateUnknown:
        case XenbusStateInitWait:
        default:
-               xenbus_dev_fatal(be->dev, -EINVAL, "saw state %d at frontend",
+               xenbus_dev_fatal(dev, -EINVAL, "saw state %d at frontend",
                                 frontend_state);
                break;
        }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added a hotplug KOBJ_OFFLINE call, for symmetry with the ONLINE call used here., Xen patchbot -unstable <=