From: Tariq Toukan <tar...@mellanox.com>

More proper to declare carrier state UP only after the channels
are ready for traffic.

Signed-off-by: Tariq Toukan <tar...@mellanox.com>
Signed-off-by: Saeed Mahameed <sae...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c 
b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 38944b8..013be09 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1451,8 +1451,8 @@ int mlx5e_open_locked(struct net_device *netdev)
                goto err_close_channels;
        }
 
-       mlx5e_update_carrier(priv);
        mlx5e_redirect_rqts(priv);
+       mlx5e_update_carrier(priv);
        mlx5e_timestamp_init(priv);
 
        schedule_delayed_work(&priv->update_stats_work, 0);
@@ -1491,8 +1491,8 @@ int mlx5e_close_locked(struct net_device *netdev)
        clear_bit(MLX5E_STATE_OPENED, &priv->state);
 
        mlx5e_timestamp_cleanup(priv);
-       mlx5e_redirect_rqts(priv);
        netif_carrier_off(priv->netdev);
+       mlx5e_redirect_rqts(priv);
        mlx5e_close_channels(priv);
 
        return 0;
-- 
1.7.1

Reply via email to