hwmon: (pmbus_core) Check adapter PEC support
authorMadhava Reddy Siddareddygari <msiddare@cisco.com>
Sat, 5 Jun 2021 05:27:02 +0000 (07:27 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 17 Jun 2021 11:21:46 +0000 (04:21 -0700)
commit4e5418f787ec56d7fe3c6efee486b8f508c58baf
treedbee202c8ea82bfaadcd91c23a9f024fc2c5ff4b
parent6b6af85410cf2db95d39ad9aa1d812a35eb1651e
hwmon: (pmbus_core) Check adapter PEC support

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@cisco.com>
[Upstream from SONiC https://github.com/Azure/sonic-linux-kernel/pull/215]
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://lore.kernel.org/r/20210605052700.541455-1-pmenzel@molgen.mpg.de
[groeck: Dropped unnecessary continuation line]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c