* [PATCH 2/4] i2c-i801: Properly report bus arbitration loss
@ 2008-06-14 19:52 Jean Delvare
0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2008-06-14 19:52 UTC (permalink / raw)
To: Linux I2C; +Cc: Amit Walambe
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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
---
drivers/i2c/busses/i2c-i801.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- linux-2.6.26-rc5.orig/drivers/i2c/busses/i2c-i801.c 2008-06-14 08:37:17.000000000 +0200
+++ linux-2.6.26-rc5/drivers/i2c/busses/i2c-i801.c 2008-06-14 17:13:08.000000000 +0200
@@ -180,10 +180,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) {
@@ -340,8 +338,8 @@ static int i801_block_transaction_byte_b
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");
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-14 19:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-14 19:52 [PATCH 2/4] i2c-i801: Properly report bus arbitration loss Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox