[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Revert previous changeset. Needs more review.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Node ID 5848356af8da250becd856b244a33c9391b9ab1c # Parent b40cb6db44e444e164fd8758452066347b1c28ee Revert previous changeset. Needs more review. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/netback/common.h | 2 +- linux-2.6-xen-sparse/drivers/xen/netback/interface.c | 8 ++++---- linux-2.6-xen-sparse/drivers/xen/netback/netback.c | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff -r b40cb6db44e4 -r 5848356af8da linux-2.6-xen-sparse/drivers/xen/netback/common.h --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Thu Jul 27 13:52:02 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Thu Jul 27 14:06:15 2006 +0100 @@ -87,7 +87,7 @@ typedef struct netif_st { /* Miscellaneous private stuff. */ enum { DISCONNECTED, DISCONNECTING, CONNECTED } status; - + int active; struct list_head list; /* scheduling list */ atomic_t refcnt; struct net_device *dev; diff -r b40cb6db44e4 -r 5848356af8da linux-2.6-xen-sparse/drivers/xen/netback/interface.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Thu Jul 27 13:52:02 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Thu Jul 27 14:06:15 2006 +0100 @@ -37,7 +37,9 @@ static void __netif_up(netif_t *netif) static void __netif_up(netif_t *netif) { struct net_device *dev = netif->dev; - netif_carrier_on(dev); + netif_tx_lock_bh(dev); + netif->active = 1; + netif_tx_unlock_bh(dev); enable_irq(netif->irq); netif_schedule_work(netif); } @@ -47,7 +49,7 @@ static void __netif_down(netif_t *netif) struct net_device *dev = netif->dev; disable_irq(netif->irq); netif_tx_lock_bh(dev); - netif_carrier_off(dev); + netif->active = 0; netif_tx_unlock_bh(dev); netif_deschedule_work(netif); } @@ -90,8 +92,6 @@ netif_t *netif_alloc(domid_t domid, unsi DPRINTK("Could not create netif: out of memory\n"); return ERR_PTR(-ENOMEM); } - - netif_carrier_off(dev); netif = netdev_priv(dev); memset(netif, 0, sizeof(*netif)); diff -r b40cb6db44e4 -r 5848356af8da linux-2.6-xen-sparse/drivers/xen/netback/netback.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Thu Jul 27 13:52:02 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Thu Jul 27 14:06:15 2006 +0100 @@ -143,7 +143,7 @@ int netif_be_start_xmit(struct sk_buff * BUG_ON(skb->dev != dev); /* Drop the packet if the target domain has no receive buffers. */ - if (unlikely(!netif_carrier_ok(dev)) || + if (!netif->active || (netif->rx_req_cons_peek == netif->rx.sring->req_prod) || ((netif->rx_req_cons_peek - netif->rx.rsp_prod_pvt) == NET_RX_RING_SIZE)) @@ -404,8 +404,7 @@ static void add_to_net_schedule_list_tai return; spin_lock_irq(&net_schedule_list_lock); - if (!__on_net_schedule_list(netif) && - likely(netif_carrier_ok(netif->dev))) { + if (!__on_net_schedule_list(netif) && netif->active) { list_add_tail(&netif->list, &net_schedule_list); netif_get(netif); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |