ia64/linux-2.6.18-xen.hg

changeset 602:a682229d0eac

netback: Ensure we send offline udev event when an interface goes away.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jul 15 16:39:39 2008 +0100 (2008-07-15)
parents e0c15322ff6d
children bd4b58143713
files drivers/xen/netback/xenbus.c
line diff
     1.1 --- a/drivers/xen/netback/xenbus.c	Mon Jul 14 10:15:44 2008 +0100
     1.2 +++ b/drivers/xen/netback/xenbus.c	Tue Jul 15 16:39:39 2008 +0100
     1.3 @@ -40,6 +40,7 @@ static int netback_remove(struct xenbus_
     1.4  	netback_remove_accelerators(be, dev);
     1.5  
     1.6  	if (be->netif) {
     1.7 +		kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
     1.8  		netif_disconnect(be->netif);
     1.9  		be->netif = NULL;
    1.10  	}
    1.11 @@ -238,6 +239,7 @@ static void frontend_changed(struct xenb
    1.12  
    1.13  	case XenbusStateClosing:
    1.14  		if (be->netif) {
    1.15 +			kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
    1.16  			netif_disconnect(be->netif);
    1.17  			be->netif = NULL;
    1.18  		}
    1.19 @@ -250,8 +252,6 @@ static void frontend_changed(struct xenb
    1.20  			break;
    1.21  		/* fall through if not online */
    1.22  	case XenbusStateUnknown:
    1.23 -		if (be->netif != NULL)
    1.24 -			kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
    1.25  		device_unregister(&dev->dev);
    1.26  		break;
    1.27