diff options
| author | Alex Vesker <valex@mellanox.com> | 2018-07-12 08:13:16 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-07-12 20:37:13 -0400 |
| commit | bedc989b0c98285b277ff8a08ff9514e580913f4 (patch) | |
| tree | b43a985053f8be734922974e06ea56854849e61f /include/linux | |
| parent | 523f9eb1ef25aab4aaf9aeb5356160e8039411ef (diff) | |
net/mlx4_core: Add Crdump FW snapshot support
Crdump allows the driver to create a snapshot of the FW PCI
crspace and health buffer during a critical FW issue.
In case of a FW command timeout, FW getting stuck or a non zero
value on the catastrophic buffer, a snapshot will be taken.
The snapshot is exposed using devlink, cr-space, fw-health
address regions are registered on init and snapshots are attached
once a new snapshot is collected by the driver.
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/device.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index e3bfe76aea98..300b944e6e1e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -852,6 +852,11 @@ struct mlx4_vf_dev { | |||
| 852 | u8 n_ports; | 852 | u8 n_ports; |
| 853 | }; | 853 | }; |
| 854 | 854 | ||
| 855 | struct mlx4_fw_crdump { | ||
| 856 | struct devlink_region *region_crspace; | ||
| 857 | struct devlink_region *region_fw_health; | ||
| 858 | }; | ||
| 859 | |||
| 855 | enum mlx4_pci_status { | 860 | enum mlx4_pci_status { |
| 856 | MLX4_PCI_STATUS_DISABLED, | 861 | MLX4_PCI_STATUS_DISABLED, |
| 857 | MLX4_PCI_STATUS_ENABLED, | 862 | MLX4_PCI_STATUS_ENABLED, |
| @@ -872,6 +877,7 @@ struct mlx4_dev_persistent { | |||
| 872 | u8 interface_state; | 877 | u8 interface_state; |
| 873 | struct mutex pci_status_mutex; /* sync pci state */ | 878 | struct mutex pci_status_mutex; /* sync pci state */ |
| 874 | enum mlx4_pci_status pci_status; | 879 | enum mlx4_pci_status pci_status; |
| 880 | struct mlx4_fw_crdump crdump; | ||
| 875 | }; | 881 | }; |
| 876 | 882 | ||
| 877 | struct mlx4_dev { | 883 | struct mlx4_dev { |
