summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2013-01-31 03:07:10 +0400
committerDavid S. Miller <davem@davemloft.net>2013-01-31 21:48:47 +0400
commit955154fa33df2b74f0fea8e7c84df6dfd954dab2 (patch)
treec53021a647f2587d29f451b9e8b4b24d645a70d8 /drivers/net/ethernet/mellanox/mlx4/en_netdev.c
parent23537b732f5dd9c917767419272aeb65cc4b8cfd (diff)
downloadlinux-955154fa33df2b74f0fea8e7c84df6dfd954dab2.tar.xz
net/mlx4_en: Don't reassign port mac address on firmware that supports it
Mac reassignments should only be done when not supported by the firmware. To accomplish that, checking firmware capability bit to know whether we should reassign macs in the driver. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_netdev.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 333a7a0b833c..7b513e9aea85 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1285,7 +1285,8 @@ void mlx4_en_stop_port(struct net_device *dev)
/* Unregister Mac address for the port */
mlx4_put_eth_qp(mdev->dev, priv->port, priv->mac, priv->base_qpn);
- mdev->mac_removed[priv->port] = 1;
+ if (!(mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN))
+ mdev->mac_removed[priv->port] = 1;
/* Remove flow steering rules for the port*/
if (mdev->dev->caps.steering_mode ==