]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
i2c: i801: Fix handling SMBHSTCNT_PEC_EN
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 27 Jul 2021 20:25:25 +0000 (22:25 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 28 Jul 2021 09:35:39 +0000 (11:35 +0200)
commita6b8bb6a813a6621c75ceacd1fa604c0229e9624
tree08742e7a13e248603a43cbdacb0c5e6df79a1443
parentff1176468d368232b684f75e82563369208bc371
i2c: i801: Fix handling SMBHSTCNT_PEC_EN

Bit SMBHSTCNT_PEC_EN is used only if software calculates the CRC and
uses register SMBPEC. This is not supported by the driver, it supports
hw-calculation of CRC only (using bit SMBAUXSTS_CRCE). The chip spec
states the following, therefore never set bit SMBHSTCNT_PEC_EN.

Chapter SMBus CRC Generation and Checking
If the AAC bit is set in the Auxiliary Control register, the PCH
automatically calculates and drives CRC at the end of the transmitted
packet for write cycles, and will check the CRC for read cycles. It will
not transmit the contents of the PEC register for CRC. The PEC bit must
not be set in the Host Control register. If this bit is set, unspecified
behavior will result.

This patch is based solely on the specification and compile-tested only,
because I have no PEC-capable devices.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c