net/mlx5e: Unregister netdev before detaching it
authorMohamad Haj Yahia <mohamad@mellanox.com>
Tue, 25 Oct 2016 15:36:30 +0000 (18:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 16:00:39 +0000 (12:00 -0400)
commit5e1e93c7047381b81236f82f60c15d49c510d1a7
tree790c14038f5d19c8acb931d4848177d3e41fedec
parent2b029556667a7fc1aea731c5828e501656f87653
net/mlx5e: Unregister netdev before detaching it

Detaching the netdev before unregistering it cause some netdev cleanup
ndos to fail because they check presence of the netdev, so we need to
unregister the netdev first.

Fixes: 26e59d8077a3 ('net/mlx5e: Implement mlx5e interface attach/detach callbacks')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c