net/mlx5: Add pci shutdown callback
authorMajd Dibbiny <majd@mellanox.com>
Thu, 21 Apr 2016 21:33:07 +0000 (00:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Apr 2016 18:51:39 +0000 (14:51 -0400)
commit5fc7197d3a256d9c5de3134870304b24892a4908
tree21c40ba8cda98f95f20a47f60d9c5d73b0180408
parent78228cbdeb0aa5c96e2a721e7e0d6953b416b5a3
net/mlx5: Add pci shutdown callback

This patch introduces kexec support for mlx5.
When switching kernels, kexec() calls shutdown, which unloads
the driver and cleans its resources.

In addition, remove unregister netdev from shutdown flow. This will
allow a clean shutdown, even if some netdev clients did not release their
reference from this netdev. Releasing The HW resources only is enough as
the kernel is shutting down

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Haggai Abramovsky <hagaya@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/main.c
include/linux/mlx5/driver.h