aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-07-14 22:38:32 +0200
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 22:38:32 +0200
commitdcb5c9239de8d3ff1c663e75f0f1c75bcb21ee20 (patch)
treed4fd4a3cabf3256edbb14a98834d350299299de6
parent90df2cb1c8822ef8d06a2b30627e7a810218b0dd (diff)
downloadkernel_samsung_smdk4412-dcb5c9239de8d3ff1c663e75f0f1c75bcb21ee20.zip
kernel_samsung_smdk4412-dcb5c9239de8d3ff1c663e75f0f1c75bcb21ee20.tar.gz
kernel_samsung_smdk4412-dcb5c9239de8d3ff1c663e75f0f1c75bcb21ee20.tar.bz2
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>
-rw-r--r--drivers/i2c/busses/i2c-i801.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 965905f..614c9e4 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -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");