From 92d23c82cd7a188639bd51d6ee43c31acecae167 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Fri, 30 Mar 2018 19:48:25 +0000 Subject: [PATCH] Collect firmware dump when mlx5core is in device error state. Firmware dump collecting should be triggered in case firmware syndrome with request for reset bit is set. MFC after: 3 days Submitted by: slavash@ Sponsored by: Mellanox Technologies --- sys/dev/mlx5/mlx5_core/mlx5_health.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_health.c b/sys/dev/mlx5/mlx5_core/mlx5_health.c index 3c47a6574daa..4aed0766cf65 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_health.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_health.c @@ -221,10 +221,13 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force) goto err_state_done; if (fatal_error == MLX5_SENSOR_FW_SYND_RFR) { + /* Get cr-dump and reset FW semaphore */ if (mlx5_core_is_pf(dev)) lock = lock_sem_sw_reset(dev, LOCK); + /* Execute cr-dump and SW reset */ if (lock != -EBUSY) { + mlx5_fwdump(dev); reset_fw_if_needed(dev); delay_ms = MLX5_FW_RESET_WAIT_MS; }