Skip to content

Commit

Permalink
net/mlx5e: Placement changed for carrier state updates
Browse files Browse the repository at this point in the history
More proper to declare carrier state UP only after the channels
are ready for traffic.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tariq Toukan authored and David S. Miller committed Mar 1, 2016
1 parent daa2156 commit ce89ef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ce89ef3

Please sign in to comment.