mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Arthur Korn <akorn@google.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] hwmon: (pmbus) Clear only CML command and data faults during probe
Date: Fri, 20 Nov 2026 11:28:38 -0800	[thread overview]
Message-ID: <4ac69e60-158c-4be0-8e2c-dce89f8d6811@roeck-us.net> (raw)
In-Reply-To: <20261120024416.338876-2-akorn@google.com>

On Fri, Nov 20, 2026 at 02:44:16AM +0000, Arthur Korn wrote:
> During driver initialization, register capability probing, and SMBALERT
> mask setup, pmbus_core and the generic pmbus driver send CLEAR_FAULTS
> (0x03) to clear any communication or command faults triggered while
> probing unsupported commands or out-of-range page/register operands.
> However, CLEAR_FAULTS unconditionally clears all latched fault status
> bits across the device, including hardware power fault registers such as
> STATUS_WORD, STATUS_VOUT, STATUS_IOUT, and STATUS_MFR_SPECIFIC. As a
> result, a BMC reboot or driver re-probe erases pre-existing voltage
> regulator fault telemetry before monitoring or diagnostic tools can
> inspect it.
> 
> Simply omitting fault clearing during probe is not viable because
> probing unsupported commands asserts PB_CML_FAULT_INVALID_COMMAND in
> STATUS_CML (causing pmbus_check_status_cml() to fail subsequent checks
> with -EIO), and probing out-of-range PMBUS_PAGE or PMBUS_SMBALERT_MASK
> operands asserts PB_CML_FAULT_INVALID_DATA and PB_STATUS_CML.
> 
> Starting with PMBus Revision 1.2, individual bits in STATUS_CML can be
> cleared via Write-1-to-Clear (W1C), a mechanism pmbus_core already uses
> in pmbus_get_boolean(). Introduce pmbus_clear_cml_fault() and export
> pmbus_clear_cml_faults() in the "PMBUS" module namespace to clear
> PB_CML_FAULT_INVALID_COMMAND | PB_CML_FAULT_INVALID_DATA in
> PMBUS_STATUS_CML during device initialization, register probing,
> pmbus_write_smbalert_mask(), and pmbus_identify() while preserving all
> other latched fault bits:
> 
> - Verify during pmbus_init_common() that PMBUS_REVISION is valid (>= 1.2
>   and not 0xff), that the driver does not hook write_byte() without
>   write_byte_data(), and that PMBUS_STATUS_CML is readable before
>   enabling STATUS_CML W1C clearing.
> - Fall back to pmbus_clear_fault_page() when STATUS_CML W1C is
>   unavailable or if writing PMBUS_STATUS_CML fails.
> 
> Tested on BMC hardware across 130 hwmon devices (105 PMBus devices
> covering tda38740/xdpe1a2g5b, isl68137/raa228234, adm1266,
> ltc4286/ltc4287, and generic pmbus regulators including TI
> tps546e25/tps546b25 and factory write-protected converters), verifying
> clean probing with no -EIO regressions, preservation of non-CML status
> faults across re-binds, and fallback when writing PMBUS_STATUS_CML is
> NACKed.
> 
> Signed-off-by: Arthur Korn <akorn@google.com>

Applied.

Thanks,
Guenter

  reply	other threads:[~2026-11-20 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  2:44 [PATCH v3 1/2] hwmon: (pmbus/max16601) Support byte data writes on VSA rail Arthur Korn
2026-11-20  2:44 ` [PATCH v3 2/2] hwmon: (pmbus) Clear only CML command and data faults during probe Arthur Korn
2026-11-20 19:28   ` Guenter Roeck [this message]
2026-11-20 19:28 ` [PATCH v3 1/2] hwmon: (pmbus/max16601) Support byte data writes on VSA rail Guenter Roeck

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=4ac69e60-158c-4be0-8e2c-dce89f8d6811@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akorn@google.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®