net/mlx5e: Register/unregister vport representors on interface attach/detach
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 22 Feb 2017 15:20:12 +0000 (17:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 15:43:09 +0000 (10:43 -0500)
commit6f08a22c5fb2b9aefb8ecd8496758e7a677c1fde
treee68058dc10cf3d37beb54024ec5fb7ec3bf2bdc0
parent18bcf742fbb0ddaf68d58ebf50b248748c983cea
net/mlx5e: Register/unregister vport representors on interface attach/detach

Currently vport representors are added only on driver load and removed on
driver unload.  Apparently we forgot to handle them when we added the
seamless reset flow feature.  This caused to leave the representors
netdevs alive and active with open HW resources on pci shutdown and on
error reset flows.

To overcome this we move their handling to interface attach/detach, so
they would be cleaned up on shutdown and recreated on reset flows.

Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c