From fedc7bd218d56a5ffc773b752ce9617f24923db0 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Wed, 2 Oct 2019 11:06:01 +0000 Subject: [PATCH] Print numeric error_type and module_status in mlx5core in case the strings are not available. Submitted by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/dev/mlx5/mlx5_core/mlx5_eq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c index c787ffa4efd..c83973cc14b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c @@ -698,16 +698,17 @@ static void mlx5_port_module_event(struct mlx5_core_dev *dev, case MLX5_MODULE_STATUS_ERROR: mlx5_core_err(dev, - "Module %u, status: error, %s\n", + "Module %u, status: error, %s (%d)\n", module_num, - mlx5_port_module_event_error_type_to_string(error_type)); + mlx5_port_module_event_error_type_to_string(error_type), + error_type); if (error_type < MLX5_MODULE_EVENT_ERROR_NUM) dev->priv.pme_stats.error_counters[error_type]++; break; default: mlx5_core_info(dev, - "Module %u, unknown status\n", module_num); + "Module %u, unknown status %d\n", module_num, module_status); } /* store module status */ if (module_num < MLX5_MAX_PORTS)