aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2017-01-10 15:33:37 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-10 21:34:01 -0500
commit3deef8cea3efcaeeae240bb00541de66abb9bfa0 (patch)
tree03207b803a95a5d3fe29843d90952b836566cc24
parent5e86397abe10aa4c884478a45e9a35b6a37d8d5d (diff)
net/mlx5e: Un-register uplink representor on nic_disable
The code before this patch registered uplink e-Switch representor on nic_enable and unregistered on nic_cleanup, the right place for this unregister is in nic_disable. Fixes: 127ea380acc9 ("net/mlx5: Add Representors registration API") Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Mohamad Haj Yahia <mohamad@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 1236b27b1493..2b7dd315020c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3675,14 +3675,8 @@ static void mlx5e_nic_init(struct mlx5_core_dev *mdev,
3675 3675
3676static void mlx5e_nic_cleanup(struct mlx5e_priv *priv) 3676static void mlx5e_nic_cleanup(struct mlx5e_priv *priv)
3677{ 3677{
3678 struct mlx5_core_dev *mdev = priv->mdev;
3679 struct mlx5_eswitch *esw = mdev->priv.eswitch;
3680
3681 mlx5e_vxlan_cleanup(priv); 3678 mlx5e_vxlan_cleanup(priv);
3682 3679
3683 if (MLX5_CAP_GEN(mdev, vport_group_manager))
3684 mlx5_eswitch_unregister_vport_rep(esw, 0);
3685
3686 if (priv->xdp_prog) 3680 if (priv->xdp_prog)
3687 bpf_prog_put(priv->xdp_prog); 3681 bpf_prog_put(priv->xdp_prog);
3688} 3682}
@@ -3807,9 +3801,14 @@ static void mlx5e_nic_enable(struct mlx5e_priv *priv)
3807 3801
3808static void mlx5e_nic_disable(struct mlx5e_priv *priv) 3802static void mlx5e_nic_disable(struct mlx5e_priv *priv)
3809{ 3803{
3804 struct mlx5_core_dev *mdev = priv->mdev;
3805 struct mlx5_eswitch *esw = mdev->priv.eswitch;
3806
3810 queue_work(priv->wq, &priv->set_rx_mode_work); 3807 queue_work(priv->wq, &priv->set_rx_mode_work);
3808 if (MLX5_CAP_GEN(mdev, vport_group_manager))
3809 mlx5_eswitch_unregister_vport_rep(esw, 0);
3811 mlx5e_disable_async_events(priv); 3810 mlx5e_disable_async_events(priv);
3812 mlx5_lag_remove(priv->mdev); 3811 mlx5_lag_remove(mdev);
3813} 3812}
3814 3813
3815static const struct mlx5e_profile mlx5e_nic_profile = { 3814static const struct mlx5e_profile mlx5e_nic_profile = {