diff options
author | Alex Vesker <valex@mellanox.com> | 2018-07-12 15:13:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-12 17:37:13 -0700 |
commit | bedc989b0c98285b277ff8a08ff9514e580913f4 (patch) | |
tree | b43a985053f8be734922974e06ea56854849e61f /drivers/net/ethernet/mellanox/mlx4/catas.c | |
parent | 523f9eb1ef25aab4aaf9aeb5356160e8039411ef (diff) | |
download | linux-bedc989b0c98285b277ff8a08ff9514e580913f4.tar.gz linux-bedc989b0c98285b277ff8a08ff9514e580913f4.tar.bz2 linux-bedc989b0c98285b277ff8a08ff9514e580913f4.zip |
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 'drivers/net/ethernet/mellanox/mlx4/catas.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/catas.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c index 8afe4b5fb09b..c81d15bf259c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/catas.c +++ b/drivers/net/ethernet/mellanox/mlx4/catas.c @@ -178,10 +178,12 @@ void mlx4_enter_error_state(struct mlx4_dev_persistent *persist) dev = persist->dev; mlx4_err(dev, "device is going to be reset\n"); - if (mlx4_is_slave(dev)) + if (mlx4_is_slave(dev)) { err = mlx4_reset_slave(dev); - else + } else { + mlx4_crdump_collect(dev); err = mlx4_reset_master(dev); + } if (!err) { mlx4_err(dev, "device was reset successfully\n"); |