From c04a1ead6ddfbfe1f0657309d9a9c733b618e75c Mon Sep 17 00:00:00 2001 From: slavash Date: Thu, 25 Oct 2018 14:12:48 +0000 Subject: [PATCH] MFC r339584: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies git-svn-id: svn://svn.freebsd.org/base/stable/10@339713 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/mlx5/device.h | 1 + sys/dev/mlx5/mlx5_core/mlx5_eq.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/dev/mlx5/device.h b/sys/dev/mlx5/device.h index 19b4a4c60..962621082 100644 --- a/sys/dev/mlx5/device.h +++ b/sys/dev/mlx5/device.h @@ -475,6 +475,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c index 842e6a4f2..b819fb2a0 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c @@ -618,6 +618,12 @@ 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 "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; -- 2.45.0