From: Ido Schimmel <idosch@nvidia.com>
To: linux-pm@vger.kernel.org
Cc: rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org,
rui.zhang@intel.com, mlxsw@nvidia.com, vadimp@nvidia.com,
Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH] thermal: core: Restore behavior regarding invalid trip points
Date: Tue, 14 Mar 2023 17:50:10 +0200 [thread overview]
Message-ID: <20230314155010.3692869-1-idosch@nvidia.com> (raw)
Cited commit stopped marking trip points with a zero temperature as
disabled, behavior that was originally introduced in commit 81ad4276b505
("Thermal: Ignore invalid trip points").
When using the mlxsw driver we see that when such trip points are not
disabled, the thermal subsystem repeatedly tries to set the state of the
associated cooling devices to the maximum state.
Fix this by restoring the original behavior and mark trip points with a
zero temperature as disabled.
Fixes: 7c3d5c20dc16 ("thermal/core: Add a generic thermal_zone_get_trip() function")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
drivers/thermal/thermal_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 5ae72f314683..63583df4498d 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1309,7 +1309,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
struct thermal_trip trip;
result = thermal_zone_get_trip(tz, count, &trip);
- if (result)
+ if (result || !trip.temperature)
set_bit(count, &tz->trips_disabled);
}
--
2.37.3
next reply other threads:[~2023-03-14 15:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 15:50 Ido Schimmel [this message]
2023-03-14 18:03 ` [PATCH] thermal: core: Restore behavior regarding invalid trip points Rafael J. Wysocki
2023-03-14 18:35 ` Ido Schimmel
2023-03-22 19:04 ` Rafael J. Wysocki
2023-03-23 21:25 ` Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230314155010.3692869-1-idosch@nvidia.com \
--to=idosch@nvidia.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=mlxsw@nvidia.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=vadimp@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).