Skip to content

[Mellanox] Add new patches come along with hw-mgmt V.7.0000.3032 to buster #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From d1bfc3dfb848ea1b402e2299b1e3b974aad9be60 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Tue, 31 Mar 2020 22:50:02 +0300
Subject: [backport 1/2] mlxsw: core: thermal: Set default thermal trips at
initialization

Set default thermal trip temperatures during thermal zone
initialization. Otherwise polling time for thermal control
could stay zero and such thermal zones will not be triggered by
thermal algorithm.

Signed-off-by: Vadim Pasternak <[email protected]>
---
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
index b75372998..fc0264f2f 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
@@ -20,6 +20,10 @@
#define MLXSW_THERMAL_ASIC_TEMP_HIGH 85000 /* 85C */
#define MLXSW_THERMAL_ASIC_TEMP_HOT 105000 /* 105C */
#define MLXSW_THERMAL_ASIC_TEMP_CRIT 110000 /* 110C */
+#define MLXSW_THERMAL_MODULE_TEMP_NORM 60000 /* 60C */
+#define MLXSW_THERMAL_MODULE_TEMP_HIGH 70000 /* 70C */
+#define MLXSW_THERMAL_MODULE_TEMP_HOT 80000 /* 80C */
+#define MLXSW_THERMAL_MODULE_TEMP_CRIT 90000 /* 90C */
#define MLXSW_THERMAL_HYSTERESIS_TEMP 5000 /* 5C */
#define MLXSW_THERMAL_MODULE_TEMP_SHIFT (MLXSW_THERMAL_HYSTERESIS_TEMP * 2)
#define MLXSW_THERMAL_ZONE_MAX_NAME 16
@@ -153,10 +157,10 @@ static int mlxsw_get_cooling_device_idx(struct mlxsw_thermal *thermal,
static void
mlxsw_thermal_module_trips_reset(struct mlxsw_thermal_module *tz)
{
- tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = 0;
- tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = 0;
- tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = 0;
- tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = 0;
+ tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = MLXSW_THERMAL_MODULE_TEMP_NORM;
+ tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = MLXSW_THERMAL_MODULE_TEMP_HIGH;
+ tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = MLXSW_THERMAL_MODULE_TEMP_HOT;
+ tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = MLXSW_THERMAL_MODULE_TEMP_CRIT;
}

static int
--
2.20.1

Loading