aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx4/en_netdev.c6
-rw-r--r--drivers/net/mlx4/mlx4_en.h1
2 files changed, 7 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)
513 513
514 queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); 514 queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
515 } 515 }
516 if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) {
517 queue_work(mdev->workqueue, &priv->mac_task);
518 mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0;
519 }
516 mutex_unlock(&mdev->state_lock); 520 mutex_unlock(&mdev->state_lock);
517} 521}
518 522
@@ -653,6 +657,7 @@ int mlx4_en_start_port(struct net_device *dev)
653 en_err(priv, "Failed setting port mac\n"); 657 en_err(priv, "Failed setting port mac\n");
654 goto tx_err; 658 goto tx_err;
655 } 659 }
660 mdev->mac_removed[priv->port] = 0;
656 661
657 /* Init port */ 662 /* Init port */
658 en_dbg(HW, priv, "Initializing port\n"); 663 en_dbg(HW, priv, "Initializing port\n");
@@ -709,6 +714,7 @@ void mlx4_en_stop_port(struct net_device *dev)
709 714
710 /* Unregister Mac address for the port */ 715 /* Unregister Mac address for the port */
711 mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index); 716 mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index);
717 mdev->mac_removed[priv->port] = 1;
712 718
713 /* Free TX Rings */ 719 /* Free TX Rings */
714 for (i = 0; i < priv->tx_ring_num; i++) { 720 for (i = 0; i < priv->tx_ring_num; i++) {
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index a09598b2b12e..5d8f097d7e06 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -341,6 +341,7 @@ struct mlx4_en_dev {
341 struct mlx4_mr mr; 341 struct mlx4_mr mr;
342 u32 priv_pdn; 342 u32 priv_pdn;
343 spinlock_t uar_lock; 343 spinlock_t uar_lock;
344 u8 mac_removed[MLX4_MAX_PORTS + 1];
344}; 345};
345 346
346 347