New mlx5 adapters allow the driver to reset the FW in the event of an error, this action called "SW Reset". When an SW reset is issued on any PF all PFs enter reset state which is a recoverable condition. The existing recovery flow was designed to allow the recovery of a VF after a PF driver reload. This patch adds the sw reset to the NIC states as a preparation for sw reset handling. When a software reset is issued the following occurs: 1. The NIC interface mode is set to 7 while the reset is in progress. 2. Once the reset completes the NIC interface mode is set to 1.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -435,6 +435,7 @@ struct mlx5_core_health { · 434 unmodified lines | |||
| 435 | u32 prev; | 435 | u32 prev; |
| 436 | int miss_counter; | 436 | int miss_counter; |
| 437 | bool sick; | 437 | bool sick; |
| 438 | u32 fatal_error; | ||
| 438 | u32 crdump_size; | 439 | u32 crdump_size; |
| 439 | /* wq spinlock to synchronize draining */ | 440 | /* wq spinlock to synchronize draining */ |
| 440 | spinlock_t wq_lock; | 441 | spinlock_t wq_lock; |
| @@ -906,7 +907,6 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev); · 465 unmodified lines | |||
| 906 | void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health); | 907 | void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health); |
| 907 | void mlx5_drain_health_wq(struct mlx5_core_dev *dev); | 908 | void mlx5_drain_health_wq(struct mlx5_core_dev *dev); |
| 908 | void mlx5_trigger_health_work(struct mlx5_core_dev *dev); | 909 | void mlx5_trigger_health_work(struct mlx5_core_dev *dev); |
| 909 | void mlx5_drain_health_recovery(struct mlx5_core_dev *dev); | ||
| 910 | int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size, | 910 | int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size, |
| 911 | struct mlx5_frag_buf *buf, int node); | 911 | struct mlx5_frag_buf *buf, int node); |
| 912 | int mlx5_buf_alloc(struct mlx5_core_dev *dev, | 912 | int mlx5_buf_alloc(struct mlx5_core_dev *dev, |