From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Armin Wolf <W_Armin@gmx.de>, Guenter Roeck <linux@roeck-us.net>,
Sasha Levin <sashal@kernel.org>,
pali@kernel.org, linux-hwmon@vger.kernel.org
Subject: [PATCH AUTOSEL 6.17-5.4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040
Date: Thu, 9 Oct 2025 11:56:18 -0400 [thread overview]
Message-ID: <20251009155752.773732-112-sashal@kernel.org> (raw)
In-Reply-To: <20251009155752.773732-1-sashal@kernel.org>
From: Armin Wolf <W_Armin@gmx.de>
[ Upstream commit 53d3bd48ef6ff1567a75ca77728968f5ab493cb4 ]
The Dell OptiPlex 7040 supports the legacy SMM interface for reading
sensors and performing fan control. Whitelist this machine so that
this driver loads automatically.
Closes: https://github.com/Wer-Wolf/i8kutils/issues/15
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250917181036.10972-5-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
YES
- Change scope and intent: The patch only adds a single DMI whitelist
entry for “Dell OptiPlex 7040” to the legacy SMM allowlist used by the
dell-smm hwmon driver. It adds a new block in `i8k_dmi_table` with
explicit vendor and exact product matches, no other logic changes. See
drivers/hwmon/dell-smm-hwmon.c:1334–1339.
- How it affects behavior: The i8k_dmi_table is consulted to decide if
legacy SMM probing is permitted. If the system is not in this table,
the driver refuses legacy SMM unless overridden by module params; with
newer code it falls back to WMI. The gating is in
`dell_smm_legacy_check()`, which returns -ENODEV when the DMI table
doesn’t match and neither `ignore_dmi` nor `force` is set
(drivers/hwmon/dell-smm-hwmon.c:1756–1761). Adding 7040 lets the
driver load and use the legacy SMM path on that system automatically.
- Autoloading safety and containment: The driver exposes a DMI modalias
and will auto-load only on machines matching this entry. The new match
is guarded by both `DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc.")` and
`DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7040")`, ensuring no
unintended matches (drivers/hwmon/dell-smm-hwmon.c:1334–1338, 1378).
- Precedent and consistency: Neighboring entries for similar models,
OptiPlex 7050 and 7060, already exist and were accepted
(drivers/hwmon/dell-smm-hwmon.c:1320–1332). Extending coverage to the
7040 is consistent with established support for this platform family
and the commit message notes the 7040 supports legacy SMM for sensors
and fan control.
- Risk assessment:
- No architectural changes, no new interfaces; it’s a pure DMI
whitelist addition in a single file.
- SMM-specific risks are mitigated by existing vendor/model blacklists
for known-problematic systems (e.g., fan support freeze blacklist;
drivers/hwmon/dell-smm-hwmon.c:1482–1512). 7040 is not on any
blacklist.
- Security posture remains unchanged: fan control and serial number
are already restricted by default to CAP_SYS_ADMIN (`restricted`
default true; drivers/hwmon/dell-smm-hwmon.c:127–133).
- User impact: Fixes a real-world usability gap where the driver would
not autoload on OptiPlex 7040 (previously requiring module parameters
or leaving sensors/fan control unavailable). The commit references a
user report (Closes: GitHub issue) and was accepted by the hwmon
maintainer.
- Backport suitability:
- Change is small, localized, and low risk.
- It aligns with stable rules for adding device IDs to enable existing
functionality.
- Applies cleanly conceptually to older stable trees which also use
`i8k_dmi_table` and `MODULE_DEVICE_TABLE(dmi, i8k_dmi_table)` (e.g.,
v6.1, v6.6), even though line positions differ.
Given the minimal, well-scoped nature of the change and clear user
benefit without broader side effects, this is a good candidate for
stable backport.
drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 3f61b2d7935e4..5801128e16c3c 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1280,6 +1280,13 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7050"),
},
},
+ {
+ .ident = "Dell OptiPlex 7040",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7040"),
+ },
+ },
{
.ident = "Dell Precision",
.matches = {
--
2.51.0
next prev parent reply other threads:[~2025-10-09 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 15:54 [PATCH AUTOSEL 6.17-6.6] hwmon: (k10temp) Add device ID for Strix Halo Sasha Levin
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17-6.12] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Sasha Levin
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17-5.15] hwmon: (sbtsi_temp) AMD CPU extended temperature range support Sasha Levin
2025-10-09 15:56 ` [PATCH AUTOSEL 6.17-6.6] hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models Sasha Levin
2025-10-09 15:56 ` Sasha Levin [this message]
2025-10-09 15:56 ` [PATCH AUTOSEL 6.17-6.12] hwmon: (lenovo-ec-sensors) Update P8 supprt Sasha Levin
2025-10-09 15:56 ` [PATCH AUTOSEL 6.17-6.1] hwmon: sy7636a: add alias Sasha Levin
2025-10-09 15:56 ` [PATCH AUTOSEL 6.17-6.1] hwmon: (asus-ec-sensors) increase timeout for locking ACPI mutex Sasha Levin
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=20251009155752.773732-112-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=W_Armin@gmx.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pali@kernel.org \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
/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