3112997b5a
- Why I did it Advance hw-mgmt service to V.7.0020.4100 Add missing thermal sensors that are supported by hw-mgmt package Delay system health service before hw-mgmt has started on Mellanox platform in order to avoid reading some sensors before ready. Depends on sonic-net/sonic-linux-kernel#305 - How I did it 1. Update hw mgmt version 2. Add missing sensors 3. Delay service - How to verify it Regression test. Signed-off-by: Stephen Sun <stephens@nvidia.com>
70 lines
1.9 KiB
Diff
70 lines
1.9 KiB
Diff
From 422b64397f2f33b394d037820f0ceb4c09e3a725 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Allen <arallen@nvidia.com>
|
|
Date: Fri, 21 Jan 2022 16:47:19 +0000
|
|
Subject: [PATCH 2/4] Disable hw-mgmt on SimX platforms
|
|
|
|
---
|
|
usr/usr/bin/hw-management-ready.sh | 11 +++++++----
|
|
usr/usr/bin/hw-management.sh | 9 +++++++++
|
|
2 files changed, 16 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/usr/usr/bin/hw-management-ready.sh b/usr/usr/bin/hw-management-ready.sh
|
|
index 88672a8..7558c68 100755
|
|
--- a/usr/usr/bin/hw-management-ready.sh
|
|
+++ b/usr/usr/bin/hw-management-ready.sh
|
|
@@ -51,17 +51,20 @@ if [ -d /var/run/hw-management ]; then
|
|
rm -fr /var/run/hw-management
|
|
fi
|
|
|
|
-case $board_type in
|
|
-VMOD0014)
|
|
+if [ -z "$(lspci -vvv | grep SimX)" ]; then
|
|
+ case $board_type in
|
|
+ VMOD0014)
|
|
if [ ! -d /sys/devices/pci0000:00/0000:00:1f.0/NVSN2201:00/mlxreg-hotplug/hwmon ]; then
|
|
timeout 180 bash -c 'until [ -d /sys/devices/pci0000:00/0000:00:1f.0/NVSN2201:00/mlxreg-hotplug/hwmon ]; do sleep 0.2; done'
|
|
fi
|
|
;;
|
|
-*)
|
|
+ *)
|
|
if [ ! -d /sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon ]; then
|
|
timeout 180 bash -c 'until [ -d /sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon ]; do sleep 0.2; done'
|
|
fi
|
|
;;
|
|
-esac
|
|
+ esac
|
|
+fi
|
|
+
|
|
echo "Start Chassis HW management service."
|
|
logger -t hw-management -p daemon.notice "Start Chassis HW management service."
|
|
diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh
|
|
index 1ee05b5..50d922b 100755
|
|
--- a/usr/usr/bin/hw-management.sh
|
|
+++ b/usr/usr/bin/hw-management.sh
|
|
@@ -2310,6 +2310,13 @@ do_chip_down()
|
|
/usr/bin/hw-management-thermal-events.sh change hotplug_asic down %S %p
|
|
}
|
|
|
|
+check_simx()
|
|
+{
|
|
+ if [ -n "$(lspci -vvv | grep SimX)" ]; then
|
|
+ exit 0
|
|
+ fi
|
|
+}
|
|
+
|
|
__usage="
|
|
Usage: $(basename "$0") [Options]
|
|
|
|
@@ -2335,6 +2342,8 @@ Options:
|
|
force-reload Performs hw-management 'stop' and the 'start.
|
|
"
|
|
|
|
+check_simx
|
|
+
|
|
case $ACTION in
|
|
start)
|
|
if [ -d /var/run/hw-management ]; then
|
|
--
|
|
2.20.1
|
|
|