mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-11 06:37:40 +07:00
i2c-i801: Properly report bus arbitration loss
Bit BUS_ERR of the status register means that the ICH host controller lost the arbitration. Report this event as such. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
90df2cb1c8
commit
dcb5c9239d
@ -179,10 +179,8 @@ static int i801_transaction(int xact)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (temp & SMBHSTSTS_BUS_ERR) {
|
if (temp & SMBHSTSTS_BUS_ERR) {
|
||||||
result = -EIO;
|
result = -EAGAIN;
|
||||||
dev_err(&I801_dev->dev, "Bus collision! SMBus may be locked "
|
dev_dbg(&I801_dev->dev, "Lost arbitration\n");
|
||||||
"until next hard reset. (sorry!)\n");
|
|
||||||
/* Clock stops and slave is stuck in mid-transmission */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp & SMBHSTSTS_DEV_ERR) {
|
if (temp & SMBHSTSTS_DEV_ERR) {
|
||||||
@ -339,8 +337,8 @@ static int i801_block_transaction_byte_by_byte(union i2c_smbus_data *data,
|
|||||||
dev_dbg(&I801_dev->dev,
|
dev_dbg(&I801_dev->dev,
|
||||||
"Error: Failed bus transaction\n");
|
"Error: Failed bus transaction\n");
|
||||||
} else if (temp & SMBHSTSTS_BUS_ERR) {
|
} else if (temp & SMBHSTSTS_BUS_ERR) {
|
||||||
result = -EIO;
|
result = -EAGAIN;
|
||||||
dev_err(&I801_dev->dev, "Bus collision!\n");
|
dev_dbg(&I801_dev->dev, "Lost arbitration\n");
|
||||||
} else if (temp & SMBHSTSTS_DEV_ERR) {
|
} else if (temp & SMBHSTSTS_DEV_ERR) {
|
||||||
result = -ENXIO;
|
result = -ENXIO;
|
||||||
dev_dbg(&I801_dev->dev, "Error: no response!\n");
|
dev_dbg(&I801_dev->dev, "Error: no response!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user