]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
imported patch revert-linux-2.6-xen-xennet-coordinate-arp-with-backend-network-status... kernel-2.6.18-92.1.18.el5.patch
authort_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:55 +0000 (12:05 +0000)
committert_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:55 +0000 (12:05 +0000)
drivers/xen/netback/common.h
drivers/xen/netback/interface.c
drivers/xen/netback/netback.c
drivers/xen/netback/xenbus.c

index 90d1d542108b542b9cc26ce21c9979aab171d181..10a1d58f59d944bb5f72203640d9d52165dc125e 100644 (file)
@@ -97,7 +97,6 @@ typedef struct netif_st {
        /* Miscellaneous private stuff. */
        struct list_head list;  /* scheduling list */
        atomic_t         refcnt;
-       struct xenbus_device *xendev;
        struct net_device *dev;
        struct net_device_stats stats;
 
@@ -192,7 +191,6 @@ int netif_map(netif_t *netif, unsigned long tx_ring_ref,
        } while (0)
 
 void netif_xenbus_init(void);
-void netif_interfaces_init(void);
 
 #define netif_schedulable(netif)                               \
        (netif_running((netif)->dev) && netback_carrier_ok(netif))
index 61f94cce53b3179ac0d171fe54aeea691e980b8d..610891fc29437393ccbbd5fe68ef4a5b0c4389e8 100644 (file)
@@ -33,7 +33,6 @@
 #include "common.h"
 #include <linux/ethtool.h>
 #include <linux/rtnetlink.h>
-#include <xen/xenbus.h>
 
 /*
  * Module parameter 'queue_length':
@@ -335,31 +334,3 @@ void netif_disconnect(netif_t *netif)
 
        free_netdev(netif->dev);
 }
-
-
-static int
-netdev_notify(struct notifier_block *this, unsigned long event, void *ptr)
-{
-       struct net_device *dev = ptr;
-
-       /* Carrier up event and is it one of our devices? */
-       if (event == NETDEV_CHANGE && netif_carrier_ok(dev) &&
-           dev->open == net_open) {
-               netif_t *netif = netdev_priv(dev);
-
-               xenbus_switch_state(netif->xendev, XenbusStateConnected);
-       }
-
-       return NOTIFY_DONE;
-}
-
-
-static struct notifier_block notifier_netdev = {
-       .notifier_call  = netdev_notify,
-};
-
-
-void netif_interfaces_init(void)
-{
-       (void)register_netdevice_notifier(&notifier_netdev);
-}
index 70aecf3f08a9fb87b0f57e58747c25d7117df63c..145f67db669f8fcdd6b6c70271add013b2687996 100644 (file)
@@ -1613,7 +1613,6 @@ static int __init netback_init(void)
 
        netif_accel_init();
 
-       netif_interfaces_init();
        netif_xenbus_init();
 
 #ifdef NETBE_DEBUG_INTERRUPT
index 491596f651d476fd7197514eaa2752e8a5367389..d7faeb624d1d2718f7d410fd7027c17029f08e63 100644 (file)
@@ -203,7 +203,6 @@ static void backend_create_netif(struct backend_info *be)
                return;
        }
 
-       be->netif->xendev = dev;
        kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
 }
 
@@ -329,6 +328,10 @@ static void connect(struct backend_info *be)
        int err;
        struct xenbus_device *dev = be->dev;
 
+       err = connect_rings(be);
+       if (err)
+               return;
+
        err = xen_net_read_mac(dev, be->netif->fe_dev_addr);
        if (err) {
                xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
@@ -339,9 +342,7 @@ static void connect(struct backend_info *be)
                          &be->netif->credit_usec);
        be->netif->remaining_credit = be->netif->credit_bytes;
 
-       err = connect_rings(be);
-       if (err)
-               return;
+       xenbus_switch_state(dev, XenbusStateConnected);
 
        netif_wake_queue(be->netif->dev);
 }