2023-02-12 03:23:47 -06:00
|
|
|
From 422b64397f2f33b394d037820f0ceb4c09e3a725 Mon Sep 17 00:00:00 2001
|
2022-02-06 08:42:53 -06:00
|
|
|
From: Alexander Allen <arallen@nvidia.com>
|
|
|
|
Date: Fri, 21 Jan 2022 16:47:19 +0000
|
2023-02-12 03:23:47 -06:00
|
|
|
Subject: [PATCH 2/4] Disable hw-mgmt on SimX platforms
|
2022-02-06 08:42:53 -06:00
|
|
|
|
|
|
|
---
|
2023-02-12 03:23:47 -06:00
|
|
|
usr/usr/bin/hw-management-ready.sh | 11 +++++++----
|
2022-02-06 08:42:53 -06:00
|
|
|
usr/usr/bin/hw-management.sh | 9 +++++++++
|
2023-02-12 03:23:47 -06:00
|
|
|
2 files changed, 16 insertions(+), 4 deletions(-)
|
2022-02-06 08:42:53 -06:00
|
|
|
|
|
|
|
diff --git a/usr/usr/bin/hw-management-ready.sh b/usr/usr/bin/hw-management-ready.sh
|
2023-02-12 03:23:47 -06:00
|
|
|
index 88672a8..7558c68 100755
|
2022-02-06 08:42:53 -06:00
|
|
|
--- a/usr/usr/bin/hw-management-ready.sh
|
|
|
|
+++ b/usr/usr/bin/hw-management-ready.sh
|
2023-02-12 03:23:47 -06:00
|
|
|
@@ -51,17 +51,20 @@ if [ -d /var/run/hw-management ]; then
|
2022-02-06 08:42:53 -06:00
|
|
|
rm -fr /var/run/hw-management
|
|
|
|
fi
|
|
|
|
|
|
|
|
-case $board_type in
|
|
|
|
-VMOD0014)
|
2023-02-12 03:23:47 -06:00
|
|
|
+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
|
|
|
|
;;
|
2022-02-06 08:42:53 -06:00
|
|
|
-*)
|
2023-02-12 03:23:47 -06:00
|
|
|
+ *)
|
|
|
|
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
|
|
|
|
;;
|
2022-02-06 08:42:53 -06:00
|
|
|
-esac
|
2023-02-12 03:23:47 -06:00
|
|
|
+ esac
|
2022-02-06 08:42:53 -06:00
|
|
|
+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
|
2023-02-12 03:23:47 -06:00
|
|
|
index 1ee05b5..50d922b 100755
|
2022-02-06 08:42:53 -06:00
|
|
|
--- a/usr/usr/bin/hw-management.sh
|
|
|
|
+++ b/usr/usr/bin/hw-management.sh
|
2023-02-12 03:23:47 -06:00
|
|
|
@@ -2310,6 +2310,13 @@ do_chip_down()
|
2022-02-06 08:42:53 -06:00
|
|
|
/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]
|
|
|
|
|
2023-02-12 03:23:47 -06:00
|
|
|
@@ -2335,6 +2342,8 @@ Options:
|
2022-02-06 08:42:53 -06:00
|
|
|
force-reload Performs hw-management 'stop' and the 'start.
|
|
|
|
"
|
|
|
|
|
|
|
|
+check_simx
|
|
|
|
+
|
|
|
|
case $ACTION in
|
|
|
|
start)
|
|
|
|
if [ -d /var/run/hw-management ]; then
|
|
|
|
--
|
2023-02-12 03:23:47 -06:00
|
|
|
2.20.1
|
2022-02-06 08:42:53 -06:00
|
|
|
|