Blame SOURCES/0276-netdrv-net-mlx5e-Fix-devlink-port-netdev-unregistrat.patch

d8f823
From f1954e485506f27fcc4ba60d0fe6d95d25f7c419 Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Mon, 1 Jun 2020 15:40:28 -0400
d8f823
Subject: [PATCH 276/312] [netdrv] net/mlx5e: Fix devlink port netdev
d8f823
 unregistration sequence
d8f823
d8f823
Message-id: <20200601154102.25980-6-ahleihel@redhat.com>
d8f823
Patchwork-id: 315710
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1842258 05/39] net/mlx5e: Fix devlink port netdev unregistration sequence
d8f823
Bugzilla: 1842258 1790226
d8f823
RH-Acked-by: Honggang Li <honli@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Marcelo Leitner <mleitner@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1790226
d8f823
Bugzilla: http://bugzilla.redhat.com/1842258
d8f823
Upstream: v5.7-rc2
d8f823
d8f823
commit 230a1bc2470c5554a8c2bfe14774863897dc9386
d8f823
Author: Parav Pandit <parav@mellanox.com>
d8f823
Date:   Fri Apr 3 02:35:46 2020 -0500
d8f823
d8f823
    net/mlx5e: Fix devlink port netdev unregistration sequence
d8f823
d8f823
    In cited commit netdevice is registered after devlink port.
d8f823
d8f823
    Unregistration flow should be mirror sequence of registration flow.
d8f823
    Hence, unregister netdevice before devlink port.
d8f823
d8f823
    Fixes: 31e87b39ba9d ("net/mlx5e: Fix devlink port register sequence")
d8f823
    Reviewed-by: Jiri Pirko <jiri@mellanox.com>
d8f823
    Signed-off-by: Parav Pandit <parav@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
d8f823
 1 file changed, 1 insertion(+), 1 deletion(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
index 7698167f6dab..15102b5b8d4a 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
@@ -5535,8 +5535,8 @@ static void mlx5e_remove(struct mlx5_core_dev *mdev, void *vpriv)
d8f823
 #ifdef CONFIG_MLX5_CORE_EN_DCB
d8f823
 	mlx5e_dcbnl_delete_app(priv);
d8f823
 #endif
d8f823
-	mlx5e_devlink_port_unregister(priv);
d8f823
 	unregister_netdev(priv->netdev);
d8f823
+	mlx5e_devlink_port_unregister(priv);
d8f823
 	mlx5e_detach(mdev, vpriv);
d8f823
 	mlx5e_destroy_netdev(priv);
d8f823
 }
d8f823
-- 
d8f823
2.13.6
d8f823