# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237299711 0
# Node ID 8b86d11a6eb39550304ab118dcade4902927a1c8
# Parent e8a9f8910a3f113759906e493eaa211e2c43cd85
netback: parent sysfs device should be set before registering.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
drivers/xen/netback/common.h | 2 +-
drivers/xen/netback/interface.c | 4 +++-
drivers/xen/netback/xenbus.c | 3 +--
3 files changed, 5 insertions(+), 4 deletions(-)
diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/common.h
--- a/drivers/xen/netback/common.h Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/common.h Tue Mar 17 14:21:51 2009 +0000
@@ -182,7 +182,7 @@ void netif_accel_init(void);
void netif_disconnect(netif_t *netif);
-netif_t *netif_alloc(domid_t domid, unsigned int handle);
+netif_t *netif_alloc(struct device *parent, domid_t domid, unsigned int
handle);
int netif_map(netif_t *netif, unsigned long tx_ring_ref,
unsigned long rx_ring_ref, unsigned int evtchn);
diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/interface.c
--- a/drivers/xen/netback/interface.c Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/interface.c Tue Mar 17 14:21:51 2009 +0000
@@ -175,7 +175,7 @@ static struct ethtool_ops network_ethtoo
.get_strings = netbk_get_strings,
};
-netif_t *netif_alloc(domid_t domid, unsigned int handle)
+netif_t *netif_alloc(struct device *parent, domid_t domid, unsigned int handle)
{
int err = 0;
struct net_device *dev;
@@ -188,6 +188,8 @@ netif_t *netif_alloc(domid_t domid, unsi
DPRINTK("Could not create netif: out of memory\n");
return ERR_PTR(-ENOMEM);
}
+
+ SET_NETDEV_DEV(dev, parent);
netif = netdev_priv(dev);
memset(netif, 0, sizeof(*netif));
diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/xenbus.c
--- a/drivers/xen/netback/xenbus.c Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/xenbus.c Tue Mar 17 14:21:51 2009 +0000
@@ -195,14 +195,13 @@ static void backend_create_netif(struct
return;
}
- be->netif = netif_alloc(dev->otherend_id, handle);
+ be->netif = netif_alloc(&dev->dev, dev->otherend_id, handle);
if (IS_ERR(be->netif)) {
err = PTR_ERR(be->netif);
be->netif = NULL;
xenbus_dev_fatal(dev, err, "creating interface");
return;
}
- SET_NETDEV_DEV(be->netif->dev, &dev->dev);
kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|