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]
Date:   Tue, 19 Apr 2022 22:18:26 +0000
From:   wujek dev <dev_public@...ek.eu>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (pmbus) allow to use a custom read_byte_data function for PMBUS_CAPABILITY

------- Original Message -------
On Wednesday, April 20th, 2022 at 00:08, Guenter Roeck <linux@...ck-us.net> wrote:


>
>
> On 4/19/22 14:52, Adam Wujek wrote:
>
> > Some devices returns a wrong value in PMBUS_CAPABILITY register.
> > Allow the use of read_byte_data function defined in a driver for
> > a specific device.
>
>
> Those devices should set PMBUS_NO_CAPABILITY.
>
> Guenter
Yes, you're correct. I was working with the older kernel. Please ignore this patch.

Adam
>
> > Signed-off-by: Adam Wujek dev_public@...ek.eu
> > ---
> > drivers/hwmon/pmbus/pmbus_core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> > index f8ca36759b0a..ef9989be8f89 100644
> > --- a/drivers/hwmon/pmbus/pmbus_core.c
> > +++ b/drivers/hwmon/pmbus/pmbus_core.c
> > @@ -2011,7 +2011,7 @@ static int pmbus_init_common(struct i2c_client *client, struct pmbus_data *data,
> > }
> >
> > /* Enable PEC if the controller supports it */
> > - ret = i2c_smbus_read_byte_data(client, PMBUS_CAPABILITY);
> > + ret = _pmbus_read_byte_data(client, -1, PMBUS_CAPABILITY);
> > if (ret >= 0 && (ret & PB_CAPABILITY_ERROR_CHECK))
> > client->flags |= I2C_CLIENT_PEC;
> > else
> > --
> > 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ