summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorYevgeny Petrilin2010-08-24 05:46:38 +0200
committerDavid S. Miller2010-08-24 23:54:53 +0200
commitd7e1a487d31933deba742c1bd3ffe0f73220b729 (patch)
tree8ecdd48757450d7924ebd9c4366d977bda903d45 /drivers/net/mlx4/en_netdev.c
parentmlx4_en: get/set ringsize uses actual ring size (diff)
downloadkernel-qcow2-linux-d7e1a487d31933deba742c1bd3ffe0f73220b729.tar.gz
kernel-qcow2-linux-d7e1a487d31933deba742c1bd3ffe0f73220b729.tar.xz
kernel-qcow2-linux-d7e1a487d31933deba742c1bd3ffe0f73220b729.zip
mlx4_en: reconfiguring mac address.
When Mac address is removed from one port of the CX2 device, the other device should reconfigure its Mac. This fixes an issue with failover, when both ports have the same Mac address, and one of the ports, is closed, the second one stops receiving traffic. (bugzilla #1965 at bugs.openfabrics.org) Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r--drivers/net/mlx4/en_netdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 968e75b7acf4..242366ca0793 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -513,6 +513,10 @@ static void mlx4_en_do_get_stats(struct work_struct *work)
queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
}
+ if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) {
+ queue_work(mdev->workqueue, &priv->mac_task);
+ mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0;
+ }
mutex_unlock(&mdev->state_lock);
}
@@ -653,6 +657,7 @@ int mlx4_en_start_port(struct net_device *dev)
en_err(priv, "Failed setting port mac\n");
goto tx_err;
}
+ mdev->mac_removed[priv->port] = 0;
/* Init port */
en_dbg(HW, priv, "Initializing port\n");
@@ -709,6 +714,7 @@ void mlx4_en_stop_port(struct net_device *dev)
/* Unregister Mac address for the port */
mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index);
+ mdev->mac_removed[priv->port] = 1;
/* Free TX Rings */
for (i = 0; i < priv->tx_ring_num; i++) {