diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-09 02:19:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-09 02:19:01 +0100 |
commit | 263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea (patch) | |
tree | 5ee497d530185d32421122729af86cf77d0dc649 /net/core | |
parent | net: Kill NETEVENT_PMTU_UPDATE. (diff) | |
parent | pch_can: fix module reload issue with MSI (diff) | |
download | linux-263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea.tar.xz linux-263fb5b1bf9265d0e4ce59ff6ea92f478b5b61ea.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e1000e/netdev.c
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index f46ee357ff2e..6392ea0a5910 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5807,31 +5807,36 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, dev_net_set(dev, &init_net); + dev->gso_max_size = GSO_MAX_SIZE; + + INIT_LIST_HEAD(&dev->ethtool_ntuple_list.list); + dev->ethtool_ntuple_list.count = 0; + INIT_LIST_HEAD(&dev->napi_list); + INIT_LIST_HEAD(&dev->unreg_list); + INIT_LIST_HEAD(&dev->link_watch_list); + dev->priv_flags = IFF_XMIT_DST_RELEASE; + setup(dev); + dev->num_tx_queues = txqs; dev->real_num_tx_queues = txqs; if (netif_alloc_netdev_queues(dev)) - goto free_pcpu; + goto free_all; #ifdef CONFIG_RPS dev->num_rx_queues = rxqs; dev->real_num_rx_queues = rxqs; if (netif_alloc_rx_queues(dev)) - goto free_pcpu; + goto free_all; #endif - dev->gso_max_size = GSO_MAX_SIZE; - - INIT_LIST_HEAD(&dev->ethtool_ntuple_list.list); - dev->ethtool_ntuple_list.count = 0; - INIT_LIST_HEAD(&dev->napi_list); - INIT_LIST_HEAD(&dev->unreg_list); - INIT_LIST_HEAD(&dev->link_watch_list); - dev->priv_flags = IFF_XMIT_DST_RELEASE; - setup(dev); strcpy(dev->name, name); dev->group = INIT_NETDEV_GROUP; return dev; +free_all: + free_netdev(dev); + return NULL; + free_pcpu: free_percpu(dev->pcpu_refcnt); kfree(dev->_tx); |