]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2028fd9ee6a3a353b40d7460a7af224927961a31
treee68058dc10cf3d37beb54024ec5fb7ec3bf2bdc0
parent851d09890da35b7c4d1416ed32003c6fa7a392ec
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: a40d16f3cd0a ("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