From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795896736; b=yfLVugKtrXxSCSoedHMVbQfGO+pmqLeA9i56X8z9pDowCXfNegN2mdkn9n+zqfiGXpLH aPdlECp92DsNrMWsZKRSQPJkDWCfGsefduCo4re4+bwruI/D3iextW7luSCYT9GwSSVkm v/QSjHEEPsromp0zls8PNRXI/46qqn8w4wqtP5QZeYKPyb8YN70oMVpNsl+sEePHQ0Kky cIstNxi9Ahr00GHEG//N/lErIGs6AXUgQ7UwXtKxUmd7Uib6NULr9Ju/q+HQUjI785EFx cnraHQqEwLNeh2D+HZLJ3zn3E7TH0Ja0v7xzs7ASJTR+zK4BUJU1R+6NesJTIwCqoTA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795896736; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=6eTdwgiWI7dMbwiSyDwsbZM7awdeNgJEcYQvwm0iVYc=; b=Fp2vYSk4TpCFhLxtjrkIiksWCpav0uTN1O6kQtaLJLDqxovJJFbnZ5ZFinGnt9gZ9U20 jfZnAhkD1BUf3D11ORppGQahdwGGezaBAzsfVVW9yfdbNC1SGxn9g1dCDFbDp2p2Nbw8g M8fe9S18aeA99HFVxvcGN+OCW0Tq0uGufamA+SjdW1JjTO+GwIhYCzqHS4Ibz4zdh9QlT sCpCl7Is4JyaDLU+W1d73H/afCcZ6PO9v/CDwXn9tL6NAV6f15n6UyE7vXppjB52xrcot yF5HY3ABka8TZdOvcruk1PBjNB3tc3doH3SjdfQz4BebUHrkOi9l7AkMqGVzXsisDew== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=guicah5E; arc=none smtp.remote-ip=209.85.208.43 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11824606A31C for ; Sat, 28 Nov 2026 20:12:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 11824606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=guicah5E Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-6a642495d81so14287899a12.2 for ; Sat, 28 Nov 2026 12:12:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795896734; x=1796501534; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=6eTdwgiWI7dMbwiSyDwsbZM7awdeNgJEcYQvwm0iVYc=; b=guicah5ESjbUvo1PQ3f6BfEpo2IR4Fwx62ScOEVK+MY3OJaKTT7I/1gCdpV0AW1So8 MuoEUNnH+7Bn69HhcmQfUM7onEdlQMVgkoO1xnQZrQMRQqdZgPq50wV7pSVf9F1hMEIk 227MZr47EJAxZu15gB8pVg8LI7jdn4SCTu+GpuJXrtmayuKzUqI7fcYIlqb/JJLDXzAl z9wdnCAiNliPNGTztvTuK0h1e1+rFTLXBYvByR7cSOMnGMq9lPVevnG6VsfDYWX7cx3i kGTA0G0PcVYM38YVyr6JJ8dcyYGzjK6IJPhAoJ/Dsqc05zqvPDPHJTqZFvkxrud9c80Y qzpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795896734; x=1796501534; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6eTdwgiWI7dMbwiSyDwsbZM7awdeNgJEcYQvwm0iVYc=; b=uoaNqWkCcYShOHzDMZn6D1VXM8hCZ+FTWaHw9vD9a6FP522hcI2EP0AwkVeWBciQwM CcUMt6uM3aMT/U49FslBRhRlvt7az2JYVRG/+9XJkQHuoPqD+LiUSDCDl1JrVyedz2WM 9rGhN/idzmiPLUfZyZBJ7tnVbPEvN4BAzZccRKaEI8wpl9YIRygk2t3rrufF/C8+0MXu MYMC/U8SZxBekj0FfhzqDyf7aQm9zxlOWE9oGdVVHu1r0p8u/e35aKA1nFrCtvi4g/tQ lkMn2eSZ1hrrUsQEXe0TfyvpJqphksp1cq+qBzkT5QYuYtqrmazCK4l9BeMmjRTZIWTQ 1ssQ== X-Gm-Message-State: APuU4Z/lb15WPUxusCPZCPTPIUIW+2nXdjVTMVZ9Rnnm/bFVJwmfE9pc L0zHzbmRwnkxLNmMD4h/VvLFpUg1LKWFB9jy2zujyIIY+SfcdykR8J1dsi26AA== X-Gm-Gg: AZFdTZeXiS/mQcnhrMnr08fnjaUALQlQJGGfFzB6itGgiGT7WCOpl5QoKTiVCtMCjdM 7hGh2roL9Zz2Q/25nw2wvRN1/QkzB14Kha29I5NTUlmgHugHH8qy0hbzGKIIdvJWNHx6bcP0OrN jQg7GRBpA4ErwwNuLYXKCbhWWg/MZx/NC8F+Ct541yA78NV5zFnrvmmJ4s8aH6kSeVl4I4fFod0 9qNguS6cjLZHH7kqdR6W1AOEeLsWy2md6Tj3rBcsODvFeFi9xzGpIrxFkm0XnbzlHMENe9sywZW C/uwqMnAml7DcfgwU79XDGLdWuRbREawY+gq9bddxceopPiQ87Rt6/dscWBRDE2u//FOWWwpN7W 4Onfa4qJh/UJylGUS6np980zZWYQ57hN8dfRMDk7ckOvP3HJcxqRR1rmQ0I1ho0A1t5LB6LFFrN lbePKPKSatyUT2yOD0zotcMlcYnMY6NtbN+MkuLNdKSy6WszSoElzpo1W4lwOYE5+vw4fUYfiqo E+yycNtOo6+9vzUso3skRaElzZ8Q/EycgmxPlQMzgrtACwsYjsUBgOrTwB4bNNCshnWrqRJmfBH oMyJZDADIdz8chOkAGT2MN6tlarpKhS+jQc7kxBbAZO0WZGIiGlVy3gQnHPeTqTWgucGLdQz6bV iVfLiENMB3mS4G0ZXF/AVslcjWTA9Dh+vuBK2TqkGqVYy3xRzK9IGB/OA X-Received: by 2002:a05:6402:1e8e:b0:6ba:5993:cec5 with SMTP id 4fb4d7f45d1cf-6ba5993f458mr18613617a12.35.1795896733948; Sat, 28 Nov 2026 12:12:13 -0800 (PST) Received: from mbp-van-jochem-1.home.net (2a02-a457-b6dc-0-64e1-3bb4-11f7-5522.fixed6.kpn.net. [2a02:a457:b6dc:0:64e1:3bb4:11f7:5522]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6ba37108c8esm12640243a12.31.2026.11.28.12.12.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 28 Nov 2026 12:12:13 -0800 (PST) From: John den Heijer To: linux-hwmon@vger.kernel.org Cc: eugene.shalygin@gmail.com, linux@roeck-us.net Subject: [RFC PATCH v3 0/3] hwmon: asus-ec-sensors: MAXIMUS XI HERO Fan Extension Card Date: Sat, 28 Nov 2026 21:09:49 +0100 Message-ID: <20261128200952.2935-1-jdenheijer74@gmail.com> X-Mailer: git-send-email 2.54.0 X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This is a request for design and safety feedback, not a request to merge the series as-is. It adds opt-in monitoring of the three fan tachometers and three thermistors on an ASUS Fan Extension Card attached to a ROG MAXIMUS XI HERO (non-WiFi), BIOS 2004. The pinned base is Guenter Roeck's hwmon-next at 8d0f79f49fb10c9f07fee6720551113272a1812b. It already contains the MAXIMUS IX EXTREME selector-based extension fan path and EC 00:60..62 temperature descriptors, but does not select these sensors on XI HERO. The BIOS 2004 image (SHA-256 034e6c688ca41cf448745398ce3ccfa184dfae217287ee7b72039498ff5aa812) provides the following property and transaction evidence: EXT_FAN1/2/3: properties 0x060400e2/e3/e4; write EC 00:43 with selector 0x0a/0x0b/0x0c, then read high/low RPM bytes at 00:57/58. The getter checks EC 00:d4 on every call and performs first-use or lost-latch read-modify-writes d4 |=3D 0x80 and 89 |=3D 0x07. EXT_Sensor1/2/3: properties 0x06030032/34/36; after a firmware card property check, write EC 00:68 =3D 0x07 immediately before each read of 00:60/61/62. The exact meaning of 0x68 is not established. BIOS 2203 has the same relevant fan mapping and getter control flow. The BIOS presence property, IsEXTFanCardExist (0x06060050), reads the EXTFanCard UEFI/Setup variable; we have not established a reliable live electrical card-presence signal. Accordingly, the XI HERO extension sensors remain disabled by default and are enabled only by an explicit module parameter on the exact non-WiFi DMI name. The WiFi entry is not changed. With the option enabled, the first read of any hwmon input may trigger a full refresh and the extension setup writes, even if the user did not request an EXT_* attribute. Patch 1 changes generic EC/selector error propagation so a failed block read cannot publish a partial sensor cache. This affects failure paths on all supported boards, not only XI HERO. Patches 2 and 3 add the board opt-in, RPM path and thermistor path. Patch 2 currently relies on the restore/error path introduced by patch 1; we would rebase or reshape the series if the generic change should be reviewed separately. The new transactions use the driver's configured ACPI EC mutex, normally \AMW0.ASMX on XI HERO. They do not add PWM, fan-control, NCT, direct EC-port or WMI accesses. They do write the EC bank selector, the BIOS observed d4/89 setup registers, the fan selector and 0x68. We do not claim that these writes are harmless when the optional card is absent. A different, locally maintained asus-ec-sensors module for Unraid 7.4.1 / 6.18.64-Unraid has returned all six channels on a physical XI HERO with the card installed, including after one reboot. The binaries and some error/selector handling differ; that test is not a runtime test of this upstream RFC. All three v2 increments compiled with W=3D1 on both x86_64 and i386. For v3 we fault-injected the actual initialization helper on a host with memory-backed EC stubs. After a lost latch, v2 skipped the retry when either the read or write at 0x89 failed; v3 repeated both setup writes. The driver object compiled with W=3D1 and no warnings after each v3 patch on x86_64 and i386 with GCC 15.2.0. On x86_64 the v3 module also linked with W=3D1 against a freshly built vmlinux; modpost completed without diagnostics. We have not run v3 on hardware. Questions for maintainers: 1. Is a default-off, exact-DMI opt-in acceptable when firmware exposes only a Setup-variable-backed card property, or is another presence mechanism required before these EC writes can be accepted? 2. Should the driver preserve the BIOS first-use d4/89 writes even when d4 bit 7 is already set? We have not isolated their necessity and do not want to replace a working BIOS sequence with an untested shortcut. 3. Is reproducing the BIOS's 68=3D07 write before every thermistor read an acceptable basis while its bit semantics remain unknown? A separate BIOS Extension control initialization path also writes 68=3D07. 4. Would you prefer patch 1 as a separate bugfix before the board support, and what fault-path regression evidence would be useful? 5. Is the separate non-WiFi board profile and module parameter an appropriate interface, or should the board/card policy be expressed differently? Changes since v2: - Add Fixes tags for the original block-read and selector error paths. - Clear the cached initialization flag before attempting either setup write, so a partial recovery can be retried. - Document enable_ext_fan and explain the BIOS cutoff of 165 RPM. - Keep the thermistor patch functionally unchanged. v2: https://lore.kernel.org/linux-hwmon/20261128191225.2990-1-jdenheijer74@= gmail.com/ John den Heijer (3): hwmon: (asus-ec-sensors) propagate EC read and selector errors hwmon: (asus-ec-sensors) add opt-in MAXIMUS XI HERO EXT fan RPM hwmon: (asus-ec-sensors) add MAXIMUS XI HERO EXT thermistors Documentation/hwmon/asus_ec_sensors.rst | 7 ++ drivers/hwmon/asus-ec-sensors.c | 142 +++++++++++++++++++++--- 2 files changed, 131 insertions(+), 18 deletions(-) base-commit: 8d0f79f49fb10c9f07fee6720551113272a1812b --=20 2.54.0 (Apple Git-157)