lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0a332f45-35e0-4db3-9545-0a8f7e9bd435@roeck-us.net>
Date:   Mon, 31 Jul 2023 09:11:27 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Naresh Solanki <naresh.solanki@...ements.com>
Cc:     Jean Delvare <jdelvare@...e.com>, vadimp@...dia.com,
        Patrick Rudolph <patrick.rudolph@...ements.com>,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD

On Mon, Jul 31, 2023 at 11:22:04AM +0200, Naresh Solanki wrote:
> From: Patrick Rudolph <patrick.rudolph@...ements.com>
> 
> MP2973 & MP2971 returns PGOOD instead of PB_STATUS_POWER_GOOD_N.
> Fix that in the read_word_data hook.
> MP2975 might be affected but needs verification.
> 
> Signed-off-by: Patrick Rudolph <patrick.rudolph@...ements.com>
> Signed-off-by: Naresh Solanki <Naresh.Solanki@...ements.com>

Applied, after rephrasing description to indicate that MP2975 is likely
not affected. Also added Fixes: tags.

Guenter

> ---
>  drivers/hwmon/pmbus/mp2975.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 
> base-commit: cb7022b8976e3c4d12cea2e7bb820a2944e2fd7b
> 
> diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c
> index 28f33f4618fa..27bb39370662 100644
> --- a/drivers/hwmon/pmbus/mp2975.c
> +++ b/drivers/hwmon/pmbus/mp2975.c
> @@ -297,6 +297,11 @@ static int mp2973_read_word_data(struct i2c_client *client, int page,
>  	int ret;
>  
>  	switch (reg) {
> +	case PMBUS_STATUS_WORD:
> +		/* MP2973 & MP2971 returns PGOOD instead of PB_STATUS_POWER_GOOD_N. */
> +		ret = pmbus_read_word_data(client, page, phase, reg);
> +		ret ^= PB_STATUS_POWER_GOOD_N;
> +		break;
>  	case PMBUS_OT_FAULT_LIMIT:
>  		ret = mp2975_read_word_helper(client, page, phase, reg,
>  					      GENMASK(7, 0));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ