sonic-buildimage/platform/mellanox/hw-management/0001-Suspend-thermal-control-by-default.patch
Nazarii Hnydyn b22fe37670 [mellanox]: Upgraded hw-management V.2.0.0160. (#2643)
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
2019-03-06 18:51:46 -08:00

52 lines
1.4 KiB
Diff

From 45587a19ab4b69e5d1ed84d9910a6b89d0fc5520 Mon Sep 17 00:00:00 2001
From: Kevin Wang <kevinw@mellanox.com>
Date: Thu, 10 Jan 2019 07:22:31 +0200
Subject: [PATCH] Suspend thermal control by default
Suspend thermal control and set the default fan speed to 60%
Signed-off-by: Kevin Wang <kevinw@mellanox.com>
---
usr/usr/bin/hw-management-thermal-control.sh | 5 +++--
usr/usr/bin/hw-management.sh | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/usr/usr/bin/hw-management-thermal-control.sh b/usr/usr/bin/hw-management-thermal-control.sh
index c7274a6..4c5438f 100755
--- a/usr/usr/bin/hw-management-thermal-control.sh
+++ b/usr/usr/bin/hw-management-thermal-control.sh
@@ -116,6 +116,7 @@ max_ports=${5:-$max_ports_def}
# Local constants
pwm_noact=0
pwm_max=1
+pwm_def_rpm=153
pwm_max_rpm=255
max_amb=120000
untrusted_sensor=0
@@ -893,8 +894,8 @@ disable_zones_max_pwm() {
fi
fi
done
- echo $pwm_max_rpm > $pwm
- log_action_msg "Set fan speed to maximum"
+ echo $pwm_def_rpm > $pwm
+ log_action_msg "Set fan speed to 60% percent"
}
trip_points_num=4
diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh
index 9214a9f..c8261a3 100755
--- a/usr/usr/bin/hw-management.sh
+++ b/usr/usr/bin/hw-management.sh
@@ -565,6 +565,7 @@ do_start()
echo $asic_bus > $config_path/asic_bus
connect_platform
+ echo 1 > $config_path/suspend
$THERMAL_CONTROL $thermal_type $max_tachos $max_psus&
}
--
1.9.1