提交 dcb5c923 编写于 作者: J Jean Delvare 提交者: Jean Delvare

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: NJean Delvare <khali@linux-fr.org>
上级 90df2cb1
......@@ -179,10 +179,8 @@ static int i801_transaction(int xact)
}
if (temp & SMBHSTSTS_BUS_ERR) {
result = -EIO;
dev_err(&I801_dev->dev, "Bus collision! SMBus may be locked "
"until next hard reset. (sorry!)\n");
/* Clock stops and slave is stuck in mid-transmission */
result = -EAGAIN;
dev_dbg(&I801_dev->dev, "Lost arbitration\n");
}
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,
"Error: Failed bus transaction\n");
} else if (temp & SMBHSTSTS_BUS_ERR) {
result = -EIO;
dev_err(&I801_dev->dev, "Bus collision!\n");
result = -EAGAIN;
dev_dbg(&I801_dev->dev, "Lost arbitration\n");
} else if (temp & SMBHSTSTS_DEV_ERR) {
result = -ENXIO;
dev_dbg(&I801_dev->dev, "Error: no response!\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册