ia64/xen-unstable

changeset 8007:fb42478203b9

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@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Nov 23 18:45:57 2005 +0000 (2005-11-23)
parents 17b98e15bf78
children fc41a9c9bc36
files linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Wed Nov 23 13:58:44 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Wed Nov 23 18:45:57 2005 +0000
     1.3 @@ -216,13 +216,14 @@ static void frontend_changed(struct xenb
     1.4  		break;
     1.5  
     1.6  	case XenbusStateClosed:
     1.7 -		device_unregister(&be->dev->dev);
     1.8 +		kobject_hotplug(&dev->dev.kobj, KOBJ_OFFLINE);
     1.9 +		device_unregister(&dev->dev);
    1.10  		break;
    1.11  
    1.12  	case XenbusStateUnknown:
    1.13  	case XenbusStateInitWait:
    1.14  	default:
    1.15 -		xenbus_dev_fatal(be->dev, -EINVAL, "saw state %d at frontend",
    1.16 +		xenbus_dev_fatal(dev, -EINVAL, "saw state %d at frontend",
    1.17  				 frontend_state);
    1.18  		break;
    1.19  	}