public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Timothy C. Sweeney-Fanelli" <tim@zerobytellc.com>,
	Eugene Shalygin <eugene.shalygin@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Sasha Levin <sashal@kernel.org>,
	corbet@lwn.net, linux-hwmon@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 7.0-6.18] hwmon: (asus-ec-sensors )add ROG CROSSHAIR X670E EXTREME
Date: Mon, 20 Apr 2026 09:18:12 -0400	[thread overview]
Message-ID: <20260420132314.1023554-98-sashal@kernel.org> (raw)
In-Reply-To: <20260420132314.1023554-1-sashal@kernel.org>

From: "Timothy C. Sweeney-Fanelli" <tim@zerobytellc.com>

[ Upstream commit ab4b7071ae0a831e4c2fd45c626c3b1d66cc1201 ]

Add support for ROG CROSSHAIR X670E EXTREME

Signed-off-by: Timothy C. Sweeney-Fanelli <tim@zerobytellc.com>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20260215151743.20138-3-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

Now I have all the information needed for a complete analysis.

---

## PHASE 1: COMMIT MESSAGE FORENSICS

**Step 1.1: Subject Line**
- Subsystem: `hwmon: (asus-ec-sensors)`
- Action verb: `add`
- Summary: Add board support for ROG CROSSHAIR X670E EXTREME motherboard

Record: [hwmon/asus-ec-sensors] [add] [New motherboard board definition
for ROG CROSSHAIR X670E EXTREME]

**Step 1.2: Tags**
- `Signed-off-by: Timothy C. Sweeney-Fanelli <tim@zerobytellc.com>` —
  original contributor/tester of the board info
- `Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>` — driver
  maintainer who curates submissions
- `Link: https://lore.kernel.org/r/20260215151743.20138-3-
  eugene.shalygin@gmail.com` — patch 3 of a series
- `Signed-off-by: Guenter Roeck <linux@roeck-us.net>` — hwmon subsystem
  maintainer who merged it

Record: No Fixes tag (expected for a board addition). No Reported-by,
Cc: stable, or syzbot. The patch went through the driver author
(Shalygin) and hwmon maintainer (Roeck). This is patch 3 of a series.

**Step 1.3: Commit Body**
The body simply says "Add support for ROG CROSSHAIR X670E EXTREME." No
bug description, stack traces, or failure modes — this is a hardware
enablement commit.

Record: No bug is described; this is a hardware support addition for a
specific ASUS motherboard model.

**Step 1.4: Hidden Bug Fix Detection**
This is not a hidden bug fix. It's a straightforward board ID / sensor
configuration addition to enable hwmon sensor monitoring on a new
motherboard.

Record: Not a hidden bug fix. Pure hardware enablement.

## PHASE 2: DIFF ANALYSIS

**Step 2.1: Inventory**
- `Documentation/hwmon/asus_ec_sensors.rst`: +1 line (adds board name to
  supported list)
- `drivers/hwmon/asus-ec-sensors.c`: +11 lines (9-line board_info struct
  + 2-line DMI table entry)
- Total: ~12 lines added, 0 removed
- Functions modified: None. Only static const data structures added.

Record: 2 files, +12 lines, 0 lines removed. Only adds static const data
(board_info struct and DMI match entry). Scope: single-file surgical
addition.

**Step 2.2: Code Flow**
- Hunk 1 (board_info): Adds `board_info_crosshair_x670e_extreme` struct
  with temperature sensors (CPU, CPU Package, MB, VRM, T_Sensor,
  Water_In, Water_Out), mutex path
  `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0`, and
  `family_amd_600_series`.
- Hunk 2 (DMI table): Adds a `DMI_EXACT_MATCH_ASUS_BOARD_NAME` entry
  linking the board name to the new struct.
- Before: The board was not recognized; driver wouldn't probe on this
  motherboard.
- After: The board is recognized and the defined sensors are exposed via
  hwmon.

**Step 2.3: Bug Mechanism**
Category: Hardware workaround / device ID addition. No bug fix. The new
struct uses existing sensor macros, an existing mutex path (verified at
7 other locations), and an existing family (`family_amd_600_series`).
The sensor table `sensors_family_amd_600[]` (line 275) includes all the
sensors referenced: `ec_sensor_temp_cpu`, `ec_sensor_temp_cpu_package`,
`ec_sensor_temp_mb`, `ec_sensor_temp_vrm`, `ec_sensor_temp_t_sensor`,
`ec_sensor_temp_water_in`, `ec_sensor_temp_water_out`.

Record: This is a hardware enablement (new board ID) addition. All
referenced sensors, mutex path, and family exist in the codebase.

**Step 2.4: Fix Quality**
- Obviously correct: Yes — follows the exact same pattern as dozens of
  other board entries
- Minimal/surgical: Yes — 12 lines of purely static data
- Regression risk: Essentially zero — the new DMI match only triggers on
  the exact board name "ROG CROSSHAIR X670E EXTREME". Cannot affect any
  other board.

## PHASE 3: GIT HISTORY

**Step 3.1: Blame**
The code this is inserted adjacent to
(`board_info_crosshair_viii_impact` and
`board_info_crosshair_x670e_gene`) has been present since 2022-2023. The
AMD 600 series family support was introduced in commit 790dec13c0128
(April 2023), and is present in all stable trees since ~v6.5+.

**Step 3.2: Fixes Tag**
No Fixes: tag present (expected — this is not a bug fix, it's a new
board addition).

**Step 3.3: File History**
The file has 65+ commits since the driver was introduced (d0ddfd241e571,
Jan 2022). The vast majority are board additions just like this one.
Eugene Shalygin is the driver author/maintainer and has authored nearly
all of them.

**Step 3.4: Author**
Eugene Shalygin is the original author and maintainer of the asus-ec-
sensors driver (copyright 2021, authored 40+ commits). Timothy Sweeney-
Fanelli is the board owner who contributed the sensor data.

**Step 3.5: Dependencies**
No dependencies. All referenced constants (`SENSOR_TEMP_CPU`,
`SENSOR_TEMP_WATER_IN`, `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0`,
`family_amd_600_series`) already exist in the 7.0 stable tree. This is a
standalone addition.

## PHASE 4: MAILING LIST RESEARCH

**Step 4.1-4.5:**
The Link: tag indicates this is patch 3 of a series
(20260215151743.20138-3). Lore.kernel.org is behind Anubis protection
and cannot be fetched. However, b4 dig confirmed similar patches from
the same author are findable. The patch was accepted by hwmon maintainer
Guenter Roeck, the standard pathway for all asus-ec-sensors changes.

Record: Could not access lore due to Anubis bot protection. The patch
followed the standard hwmon submission path (contributor -> driver
author -> Guenter Roeck).

## PHASE 5: CODE SEMANTIC ANALYSIS

**Step 5.1-5.5:**
No functions are modified. The change adds only static const data
structures. The DMI matching framework (`dmi_table[]`) is used during
module probe. When the DMI system matches the board name, the driver
reads sensors from EC registers at the offsets defined in
`sensors_family_amd_600[]`. This is a purely data-driven mechanism — no
code path changes.

Record: No code flow changes. Only static data additions. The DMI match
→ board_info → sensor table pipeline is well-established and works
identically for all 40+ supported boards.

## PHASE 6: STABLE TREE ANALYSIS

**Step 6.1:**
The driver exists since v5.18 (d0ddfd241e571, Jan 2022). AMD 600 series
support exists since v6.5 (790dec13c0128, Apr 2023). The
`ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0` mutex path and all sensor
macros exist in 7.0.

**Step 6.2:**
The patch should apply cleanly. It's a pure addition between existing
entries in two sorted lists (board_info structs and DMI table). No
conflicts expected.

**Step 6.3:**
No related fix needed — this board has never been supported before.

## PHASE 7: SUBSYSTEM CONTEXT

**Step 7.1:**
Subsystem: hwmon (hardware monitoring). Criticality: PERIPHERAL —
affects only users of this specific ASUS motherboard. However, hwmon
sensor monitoring is important for users who rely on temperature/fan
monitoring for system health.

**Step 7.2:**
The driver is actively maintained with 65+ commits, mostly board
additions from the original author.

## PHASE 8: IMPACT AND RISK ASSESSMENT

**Step 8.1:** Affected users: only owners of the ROG CROSSHAIR X670E
EXTREME motherboard.

**Step 8.2:** Trigger: automatic during driver probe if the DMI board
name matches.

**Step 8.3:** Failure mode without fix: no hwmon sensor data available
for this board. Users cannot monitor CPU/VRM temperatures, water cooling
temps, etc. through the standard hwmon interface.

**Step 8.4:**
- Benefit: LOW-MEDIUM — enables hardware monitoring for a specific
  popular enthusiast motherboard
- Risk: VERY LOW — 12 lines of static const data, cannot affect any
  other board
- Ratio: Favorable

## PHASE 9: FINAL SYNTHESIS

**Evidence FOR backporting:**
- Falls squarely into the "new device ID / board addition" exception
  category
- Trivially small (12 lines of static const data)
- Zero regression risk (only triggers on exact DMI board name match)
- All infrastructure (AMD 600 series sensors, mutex path) already exists
  in stable
- Authored by the driver maintainer, accepted by the hwmon subsystem
  maintainer
- Follows identical pattern to dozens of prior board additions

**Evidence AGAINST backporting:**
- This is not a bug fix — it's hardware enablement
- Affects only one specific motherboard model
- No Cc: stable tag (but this is expected for board additions needing
  manual review)

**Stable rules checklist:**
1. Obviously correct? YES — identical pattern to 40+ other entries
2. Fixes a real bug? NO — but falls into the device ID exception
3. Important issue? NO — but enables real hardware for real users
4. Small and contained? YES — 12 lines, static data only
5. No new features/APIs? YES — no new interfaces, just enables existing
   driver on new hardware
6. Can apply to stable? YES — clean apply expected

**Verification:**
- [Phase 1] Parsed tags: SOBs from Timothy Sweeney-Fanelli
  (contributor), Eugene Shalygin (driver author), Guenter Roeck (hwmon
  maintainer). Link to lore present.
- [Phase 2] Diff: +12 lines across 2 files. Only static const board_info
  struct and DMI table entry added. No code logic changes.
- [Phase 3] git log: Eugene Shalygin authored 40+ commits to this file,
  is the original driver author (copyright 2021).
- [Phase 3] git log: AMD 600 series support introduced in 790dec13c0128
  (April 2023), present in 7.0 tree.
- [Phase 3] Verified `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0` used
  by 7 other boards (lines 567, 673, 687, 694, 702, 710, 777).
- [Phase 3] Verified all sensor macros used (`SENSOR_TEMP_CPU`,
  `SENSOR_TEMP_CPU_PACKAGE`, `SENSOR_TEMP_MB`, `SENSOR_TEMP_VRM`,
  `SENSOR_TEMP_T_SENSOR`, `SENSOR_TEMP_WATER_IN`,
  `SENSOR_TEMP_WATER_OUT`) exist in `sensors_family_amd_600[]` (lines
  275-293).
- [Phase 4] Lore inaccessible due to Anubis protection; b4 dig could not
  find the commit directly (likely not yet in tree). The submission path
  (contributor -> driver author -> Guenter Roeck) is standard.
- [Phase 5] No functions modified. Only static const data. Zero code
  path impact.
- [Phase 6] Driver and AMD 600 series support exist in 7.0 tree. Clean
  apply expected.
- [Phase 8] Risk: VERY LOW (static data only, DMI-scoped). Benefit:
  enables hwmon on a specific board.

This is a textbook new board ID addition to an existing driver — one of
the explicitly allowed exception categories for stable backporting. It's
trivially small, uses only existing infrastructure, and cannot regress
any other system.

**YES**

 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
index 58986546c7233..8a080a786abd2 100644
--- a/Documentation/hwmon/asus_ec_sensors.rst
+++ b/Documentation/hwmon/asus_ec_sensors.rst
@@ -22,6 +22,7 @@ Supported boards:
  * ROG CROSSHAIR VIII FORMULA
  * ROG CROSSHAIR VIII HERO
  * ROG CROSSHAIR VIII IMPACT
+ * ROG CROSSHAIR X670E EXTREME
  * ROG CROSSHAIR X670E HERO
  * ROG CROSSHAIR X670E GENE
  * ROG MAXIMUS X HERO
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index adedaf0db10e6..934e37738a516 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -456,6 +456,15 @@ static const struct ec_board_info board_info_crosshair_viii_impact = {
 	.family = family_amd_500_series,
 };
 
+static const struct ec_board_info board_info_crosshair_x670e_extreme = {
+	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
+		SENSOR_TEMP_MB | SENSOR_TEMP_VRM |
+		SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_WATER_IN |
+		SENSOR_TEMP_WATER_OUT,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0,
+	.family = family_amd_600_series,
+};
+
 static const struct ec_board_info board_info_crosshair_x670e_gene = {
 	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
 		SENSOR_TEMP_T_SENSOR |
@@ -825,6 +834,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_crosshair_viii_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR VIII IMPACT",
 					&board_info_crosshair_viii_impact),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR X670E EXTREME",
+					&board_info_crosshair_x670e_extreme),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR X670E GENE",
 					&board_info_crosshair_x670e_gene),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR X670E HERO",
-- 
2.53.0


  parent reply	other threads:[~2026-04-20 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260420132314.1023554-1-sashal@kernel.org>
2026-04-20 13:16 ` [PATCH AUTOSEL 7.0-6.19] hwmon: (nct6775) Add ASUS X870/W480 to WMI monitoring list Sasha Levin
2026-04-20 13:18 ` Sasha Levin [this message]
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.18] hwmon: (gpd-fan) Add GPD Win 5 Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.18] hwmon: (nct6683) Add customer ID for ASRock B650I Lightning WiFi 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=20260420132314.1023554-98-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=corbet@lwn.net \
    --cc=eugene.shalygin@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=tim@zerobytellc.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