Skip to content

Commit 065b621

Browse files
hkallweitwsakernel
authored andcommitted
i2c: i801: Ensure that SMBHSTSTS_INUSE_STS is cleared when leaving i801_access
As explained in [0] currently we may leave SMBHSTSTS_INUSE_STS set, thus potentially breaking ACPI/BIOS usage of the SMBUS device. Seems patch [0] needs a little bit more of review effort, therefore I'd suggest to apply a part of it as quick win. Just clearing SMBHSTSTS_INUSE_STS when leaving i801_access() should fix the referenced issue and leaves more time for discussing a more sophisticated locking handling. [0] https://www.spinics.net/lists/linux-i2c/msg51558.html Fixes: 01590f3 ("i2c: i801: Instantiate SPD EEPROMs automatically") Suggested-by: Hector Martin <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Hector Martin <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Tested-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 009c9aa commit 065b621

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/i2c/busses/i2c-i801.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,9 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
978978
}
979979

980980
out:
981+
/* Unlock the SMBus device for use by BIOS/ACPI */
982+
outb_p(SMBHSTSTS_INUSE_STS, SMBHSTSTS(priv));
983+
981984
pm_runtime_mark_last_busy(&priv->pci_dev->dev);
982985
pm_runtime_put_autosuspend(&priv->pci_dev->dev);
983986
mutex_unlock(&priv->acpi_lock);

0 commit comments

Comments
 (0)