aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-29 14:24:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-29 14:24:28 -0400
commit6e49ba1bb1deddd2da806284a37e7f3d3d711301 (patch)
treeaa707aa3140bd7dc1853051c1c1a7bd9d280ebd4 /drivers/net
parentd0af69886656a93a8c4e9b5bb8f1894a50cf2d8a (diff)
parentf36963c9d3f6f415732710da3acdd8608a9fa0e5 (diff)
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull fixes for cpumask and modules from Rusty Russell: "** NOW WITH TESTING! ** Two fixes which got lost in my recent distraction. One is a weird cpumask function which needed to be rewritten, the other is a module bug which is cc:stable" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: cpumask_set_cpu_local_first => cpumask_local_spread, lament module: Call module notifier on failure after complete_formation()
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c10
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_tx.c6
3 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index a6dcbf850c1f..6f9ffb9026cd 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2358,11 +2358,11 @@ static int be_evt_queues_create(struct be_adapter *adapter)
2358 adapter->cfg_num_qs); 2358 adapter->cfg_num_qs);
2359 2359
2360 for_all_evt_queues(adapter, eqo, i) { 2360 for_all_evt_queues(adapter, eqo, i) {
2361 int numa_node = dev_to_node(&adapter->pdev->dev);
2361 if (!zalloc_cpumask_var(&eqo->affinity_mask, GFP_KERNEL)) 2362 if (!zalloc_cpumask_var(&eqo->affinity_mask, GFP_KERNEL))
2362 return -ENOMEM; 2363 return -ENOMEM;
2363 cpumask_set_cpu_local_first(i, dev_to_node(&adapter->pdev->dev), 2364 cpumask_set_cpu(cpumask_local_spread(i, numa_node),
2364 eqo->affinity_mask); 2365 eqo->affinity_mask);
2365
2366 netif_napi_add(adapter->netdev, &eqo->napi, be_poll, 2366 netif_napi_add(adapter->netdev, &eqo->napi, be_poll,
2367 BE_NAPI_WEIGHT); 2367 BE_NAPI_WEIGHT);
2368 napi_hash_add(&eqo->napi); 2368 napi_hash_add(&eqo->napi);
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 32f5ec737472..cf467a9f6cc7 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1501,17 +1501,13 @@ static int mlx4_en_init_affinity_hint(struct mlx4_en_priv *priv, int ring_idx)
1501{ 1501{
1502 struct mlx4_en_rx_ring *ring = priv->rx_ring[ring_idx]; 1502 struct mlx4_en_rx_ring *ring = priv->rx_ring[ring_idx];
1503 int numa_node = priv->mdev->dev->numa_node; 1503 int numa_node = priv->mdev->dev->numa_node;
1504 int ret = 0;
1505 1504
1506 if (!zalloc_cpumask_var(&ring->affinity_mask, GFP_KERNEL)) 1505 if (!zalloc_cpumask_var(&ring->affinity_mask, GFP_KERNEL))
1507 return -ENOMEM; 1506 return -ENOMEM;
1508 1507
1509 ret = cpumask_set_cpu_local_first(ring_idx, numa_node, 1508 cpumask_set_cpu(cpumask_local_spread(ring_idx, numa_node),
1510 ring->affinity_mask); 1509 ring->affinity_mask);
1511 if (ret) 1510 return 0;
1512 free_cpumask_var(ring->affinity_mask);
1513
1514 return ret;
1515} 1511}
1516 1512
1517static void mlx4_en_free_affinity_hint(struct mlx4_en_priv *priv, int ring_idx) 1513static void mlx4_en_free_affinity_hint(struct mlx4_en_priv *priv, int ring_idx)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index f7bf312fb443..7bed3a88579f 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -144,9 +144,9 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
144 ring->queue_index = queue_index; 144 ring->queue_index = queue_index;
145 145
146 if (queue_index < priv->num_tx_rings_p_up) 146 if (queue_index < priv->num_tx_rings_p_up)
147 cpumask_set_cpu_local_first(queue_index, 147 cpumask_set_cpu(cpumask_local_spread(queue_index,
148 priv->mdev->dev->numa_node, 148 priv->mdev->dev->numa_node),
149 &ring->affinity_mask); 149 &ring->affinity_mask);
150 150
151 *pring = ring; 151 *pring = ring;
152 return 0; 152 return 0;