aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorMajd Dibbiny <majd@mellanox.com>2016-04-21 17:33:07 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-24 14:51:39 -0400
commit5fc7197d3a256d9c5de3134870304b24892a4908 (patch)
tree21c40ba8cda98f95f20a47f60d9c5d73b0180408 /include/linux/mlx5/driver.h
parent78228cbdeb0aa5c96e2a721e7e0d6953b416b5a3 (diff)
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>
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index dcd5ac8d3b14..369c837d40f5 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -519,8 +519,9 @@ enum mlx5_device_state {
519}; 519};
520 520
521enum mlx5_interface_state { 521enum mlx5_interface_state {
522 MLX5_INTERFACE_STATE_DOWN, 522 MLX5_INTERFACE_STATE_DOWN = BIT(0),
523 MLX5_INTERFACE_STATE_UP, 523 MLX5_INTERFACE_STATE_UP = BIT(1),
524 MLX5_INTERFACE_STATE_SHUTDOWN = BIT(2),
524}; 525};
525 526
526enum mlx5_pci_status { 527enum mlx5_pci_status {
@@ -544,7 +545,7 @@ struct mlx5_core_dev {
544 enum mlx5_device_state state; 545 enum mlx5_device_state state;
545 /* sync interface state */ 546 /* sync interface state */
546 struct mutex intf_state_mutex; 547 struct mutex intf_state_mutex;
547 enum mlx5_interface_state interface_state; 548 unsigned long intf_state;
548 void (*event) (struct mlx5_core_dev *dev, 549 void (*event) (struct mlx5_core_dev *dev,
549 enum mlx5_dev_event event, 550 enum mlx5_dev_event event,
550 unsigned long param); 551 unsigned long param);