@@ -175,7 +175,6 @@
#define SMBHSTCNT_KILL BIT(1)
#define SMBHSTCNT_LAST_BYTE BIT(5)
#define SMBHSTCNT_START BIT(6)
-#define SMBHSTCNT_PEC_EN BIT(7) /* ICH3 and later */
/* I801 Hosts Status register bits */
#define SMBHSTSTS_BYTE_DONE BIT(7)
@@ -496,8 +495,6 @@ static int i801_transaction(struct i801_
return i801_check_post(priv, result ? priv->status : -ETIMEDOUT);
}
- /* the current contents of SMBHSTCNT can be overwritten, since PEC,
- * SMBSCMD are passed in xact */
outb_p(xact | SMBHSTCNT_START, SMBHSTCNT(priv));
status = i801_wait_intr(priv);
@@ -1657,7 +1654,6 @@ static void i801_setup_hstcfg(struct i80
unsigned char hstcfg = priv->original_hstcfg;
hstcfg &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */
- hstcfg &= ~SMBHSTCNT_PEC_EN; /* Disable software PEC */
hstcfg |= SMBHSTCFG_HST_EN;
pci_write_config_byte(priv->pci_dev, SMBHSTCFG, hstcfg);
}
SMBHSTCNT_PEC_EN does not belong to register SMBHSTCFG, but - as its name suggests - to register SMBHSTCNT. Therefore resetting this bit in the former register is wrong and useless. Thankfully this bit is marked as reserved there so no harm done. Considering that the value of SMBHSTCNT is overwritten for every transaction, clearing this bit in advance is actually not needed at all, so we can simply skip this step. Fixes: a6b8bb6a813a ("i2c: i801: Fix handling SMBHSTCNT_PEC_EN") Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: Wolfram Sang <wsa@kernel.org> --- drivers/i2c/busses/i2c-i801.c | 4 ---- 1 file changed, 4 deletions(-)