aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-05-23 18:03:19 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-05-23 18:03:19 +0000
commitae05ff00e3e3045bd7cff9b01b78eeb0c7a9c2b4 (patch)
tree5148042976a64b05dcd67d52d4002f96ca186791
parent07fb2ca9fec229c6cd43cd0d12b58c5de31f9e8e (diff)
downloadsrc-ae05ff00e3e3045bd7cff9b01b78eeb0c7a9c2b4.tar.gz
src-ae05ff00e3e3045bd7cff9b01b78eeb0c7a9c2b4.zip
MFC r361276, r361276:
mlx5_core: add new port module event types to decode. Sponsored by: Mellanox Technologies Approved by: re (delphij)
Notes
Notes: svn path=/releng/11.4/; revision=361420
-rw-r--r--sys/dev/mlx5/device.h7
-rw-r--r--sys/dev/mlx5/mlx5_core/mlx5_eq.c14
-rw-r--r--sys/dev/mlx5/mlx5_core/mlx5_main.c9
3 files changed, 29 insertions, 1 deletions
diff --git a/sys/dev/mlx5/device.h b/sys/dev/mlx5/device.h
index 993b291f80b4..76b9cf8f4bae 100644
--- a/sys/dev/mlx5/device.h
+++ b/sys/dev/mlx5/device.h
@@ -551,6 +551,13 @@ enum {
MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5,
MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6,
MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7,
+ MLX5_MODULE_EVENT_ERROR_PMD_TYPE_NOT_ENABLED = 0x8,
+ MLX5_MODULE_EVENT_ERROR_LASTER_TEC_FAILURE = 0x9,
+ MLX5_MODULE_EVENT_ERROR_HIGH_CURRENT = 0xa,
+ MLX5_MODULE_EVENT_ERROR_HIGH_VOLTAGE = 0xb,
+ MLX5_MODULE_EVENT_ERROR_PCIE_SYS_POWER_SLOT_EXCEEDED = 0xc,
+ MLX5_MODULE_EVENT_ERROR_HIGH_POWER = 0xd,
+ MLX5_MODULE_EVENT_ERROR_MODULE_STATE_MACHINE_FAULT = 0xe,
MLX5_MODULE_EVENT_ERROR_NUM ,
};
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c
index de08c3ec80f9..7c4d2323d37a 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c
@@ -659,6 +659,20 @@ static const char *mlx5_port_module_event_error_type_to_string(u8 error_type)
return "High Temperature";
case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED:
return "Bad or shorted cable/module";
+ case MLX5_MODULE_EVENT_ERROR_PMD_TYPE_NOT_ENABLED:
+ return "PMD type is not enabled";
+ case MLX5_MODULE_EVENT_ERROR_LASTER_TEC_FAILURE:
+ return "Laster_TEC_failure";
+ case MLX5_MODULE_EVENT_ERROR_HIGH_CURRENT:
+ return "High_current";
+ case MLX5_MODULE_EVENT_ERROR_HIGH_VOLTAGE:
+ return "High_voltage";
+ case MLX5_MODULE_EVENT_ERROR_PCIE_SYS_POWER_SLOT_EXCEEDED:
+ return "pcie_system_power_slot_Exceeded";
+ case MLX5_MODULE_EVENT_ERROR_HIGH_POWER:
+ return "High_power";
+ case MLX5_MODULE_EVENT_ERROR_MODULE_STATE_MACHINE_FAULT:
+ return "Module_state_machine_fault";
default:
return "Unknown error type";
}
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c
index 1b9d89e8ca91..98f732171b30 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_main.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c
@@ -1284,7 +1284,14 @@ m(+1, u64, no_eeprom, "no_eeprom", "No EEPROM/retry timeout") \
m(+1, u64, enforce_part_number, "enforce_part_number", "Module Enforce part number list") \
m(+1, u64, unknown_id, "unknown_id", "Module Unknown identifier") \
m(+1, u64, high_temp, "high_temp", "Module High Temperature") \
-m(+1, u64, cable_shorted, "cable_shorted", "Module Cable is shorted")
+m(+1, u64, cable_shorted, "cable_shorted", "Module Cable is shorted") \
+m(+1, u64, pmd_type_not_enabled, "pmd_type_not_enabled", "PMD type is not enabled") \
+m(+1, u64, laster_tec_failure, "laster_tec_failure", "Laster TEC failure") \
+m(+1, u64, high_current, "high_current", "High current") \
+m(+1, u64, high_voltage, "high_voltage", "High voltage") \
+m(+1, u64, pcie_sys_power_slot_exceeded, "pcie_sys_power_slot_exceeded", "PCIe system power slot Exceeded") \
+m(+1, u64, high_power, "high_power", "High power") \
+m(+1, u64, module_state_machine_fault, "module_state_machine_fault", "Module State Machine fault")
static const char *mlx5_pme_err_desc[] = {
MLX5_PORT_MODULE_ERROR_STATS(MLX5_STATS_DESC)