diff options
author | Carol L Soto <clsoto@linux.vnet.ibm.com> | 2015-10-07 12:31:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-08 08:20:24 -0400 |
commit | 85121d6ee6973f98789bf7343f7f636c01e2de19 (patch) | |
tree | cbdb2c33b6765593495404a7d56ba3d58d00cd59 | |
parent | 9d3a6386c8238bfacf57ee9dac68ec4b40b302fe (diff) |
net/mlx4: Remove shared_ports variable at mlx4_enable_msi_x
If we get MAX_MSIX interrupts would like to have each receive ring
with his own msix interrupt line. Do not need the shared_ports
variable at mlx4_enable_msix
Fixes: 9293267a3e2a ('net/mlx4_core: Capping number of requested MSIXs to MAX_MSIX')
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Acked-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 006757f80988..cc3a9897574c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -2669,14 +2669,11 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) | |||
2669 | 2669 | ||
2670 | if (msi_x) { | 2670 | if (msi_x) { |
2671 | int nreq = dev->caps.num_ports * num_online_cpus() + 1; | 2671 | int nreq = dev->caps.num_ports * num_online_cpus() + 1; |
2672 | bool shared_ports = false; | ||
2673 | 2672 | ||
2674 | nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, | 2673 | nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, |
2675 | nreq); | 2674 | nreq); |
2676 | if (nreq > MAX_MSIX) { | 2675 | if (nreq > MAX_MSIX) |
2677 | nreq = MAX_MSIX; | 2676 | nreq = MAX_MSIX; |
2678 | shared_ports = true; | ||
2679 | } | ||
2680 | 2677 | ||
2681 | entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); | 2678 | entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); |
2682 | if (!entries) | 2679 | if (!entries) |
@@ -2699,9 +2696,6 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) | |||
2699 | bitmap_zero(priv->eq_table.eq[MLX4_EQ_ASYNC].actv_ports.ports, | 2696 | bitmap_zero(priv->eq_table.eq[MLX4_EQ_ASYNC].actv_ports.ports, |
2700 | dev->caps.num_ports); | 2697 | dev->caps.num_ports); |
2701 | 2698 | ||
2702 | if (MLX4_IS_LEGACY_EQ_MODE(dev->caps)) | ||
2703 | shared_ports = true; | ||
2704 | |||
2705 | for (i = 0; i < dev->caps.num_comp_vectors + 1; i++) { | 2699 | for (i = 0; i < dev->caps.num_comp_vectors + 1; i++) { |
2706 | if (i == MLX4_EQ_ASYNC) | 2700 | if (i == MLX4_EQ_ASYNC) |
2707 | continue; | 2701 | continue; |
@@ -2709,7 +2703,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) | |||
2709 | priv->eq_table.eq[i].irq = | 2703 | priv->eq_table.eq[i].irq = |
2710 | entries[i + 1 - !!(i > MLX4_EQ_ASYNC)].vector; | 2704 | entries[i + 1 - !!(i > MLX4_EQ_ASYNC)].vector; |
2711 | 2705 | ||
2712 | if (shared_ports) { | 2706 | if (MLX4_IS_LEGACY_EQ_MODE(dev->caps)) { |
2713 | bitmap_fill(priv->eq_table.eq[i].actv_ports.ports, | 2707 | bitmap_fill(priv->eq_table.eq[i].actv_ports.ports, |
2714 | dev->caps.num_ports); | 2708 | dev->caps.num_ports); |
2715 | /* We don't set affinity hint when there | 2709 | /* We don't set affinity hint when there |