net/mlx5e: Placement changed for carrier state updates

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>
This commit is contained in:
Tariq Toukan 2016-03-02 00:13:33 +02:00 committed by David S. Miller
parent daa21560a2
commit ce89ef36d2
1 changed files with 2 additions and 2 deletions

View File

@ -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;