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: <8534d106-0936-a41d-b9c7-2f527b315dae@molgen.mpg.de>
Date:   Sat, 5 Jun 2021 07:29:57 +0200
From:   Paul Menzel <pmenzel@...gen.mpg.de>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Jean Delvare <jdelvare@...e.com>,
        Madhava Reddy Siddareddygari <msiddare@...co.com>,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (pmbus_core) Check adapter PEC support

Dear Guenter,


Am 05.06.21 um 02:51 schrieb Guenter Roeck:
> On Fri, Jun 04, 2021 at 03:57:14PM +0200, Paul Menzel wrote:
>> From: Madhava Reddy Siddareddygari <msiddare@...co.com>
>>
>> Currently, for Packet Error Checking (PEC) only the controller
>> is checked for support. This causes problems on the cisco-8000
>> platform where a SMBUS transaction errors are observed. This is
>> because PEC has to be enabled only if both controller and
>> adapter support it.
>>
>> Added code to check PEC capability for adapter and enable it
>> only if both controller and adapter supports PEC.
>>
>> Signed-off-by: Madhava Reddy Siddareddygari <msiddare@...co.com>
>> [Upstream from SONiC https://github.com/Azure/sonic-linux-kernel/pull/215]
>> Signed-off-by: Paul Menzel <pmenzel@...gen.mpg.de>
>> ---
>>   drivers/hwmon/pmbus/pmbus_core.c | 10 ++++++----
>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
>> index bbd745178147..7fbd82b7560d 100644
>> --- a/drivers/hwmon/pmbus/pmbus_core.c
>> +++ b/drivers/hwmon/pmbus/pmbus_core.c
>> @@ -2214,11 +2214,13 @@ static int pmbus_init_common(struct i2c_client *client, struct pmbus_data *data,
>>   		data->has_status_word = true;
>>   	}
>>   
>> -	/* Enable PEC if the controller supports it */
>> -	if (!(data->flags & PMBUS_NO_CAPABILITY)) {
> 
> What is the rationale for removing this check ?
> AFAICS that will render the ibm-cffps driver unusable.

I screwed up forward porting this change. Thank you for spotting this. I 
sent a second iteration/version 2 of this patch.


Kind regards,

Paul


>> -		ret = i2c_smbus_read_byte_data(client, PMBUS_CAPABILITY);
>> -		if (ret >= 0 && (ret & PB_CAPABILITY_ERROR_CHECK))
>> +	/* Enable PEC if the controller and bus supports it */
>> +	ret = i2c_smbus_read_byte_data(client, PMBUS_CAPABILITY);
>> +	if (ret >= 0 && (ret & PB_CAPABILITY_ERROR_CHECK)) {
>> +		if (i2c_check_functionality(client->adapter,
>> +			I2C_FUNC_SMBUS_PEC)) {
>>   			client->flags |= I2C_CLIENT_PEC;
>> +		}
>>   	}
>>   
>>   	/*
>> -- 
>> 2.32.0.rc2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ