aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Tarreau <wtarreau@exceliance.fr>2009-09-18 16:45:47 -0400
committerJean Delvare <khali@linux-fr.org>2009-09-18 16:45:47 -0400
commitfce96f3e5d34b0e3195f9d1bf2b3c7e3841e90ff (patch)
tree14dea67c557461c45d42b4ef200c2e0f81b5004e
parent2bb5095affdb8d6e8646a5b8b5a35c1d6a28c3e7 (diff)
i2c/scx200_acb: Provide more information on bus errors
Upon a bus error, it's rather hard to guess what happened. Dumping the address, length and status provides a lot of value for troubleshooting issues. Signed-off-by: Willy Tarreau <wtarreau@exceliance.fr> Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/busses/scx200_acb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 648ecc6f60e6..cf994bd01d9c 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -217,8 +217,10 @@ static void scx200_acb_machine(struct scx200_acb_iface *iface, u8 status)
217 return; 217 return;
218 218
219 error: 219 error:
220 dev_err(&iface->adapter.dev, "%s in state %s\n", errmsg, 220 dev_err(&iface->adapter.dev,
221 scx200_acb_state_name[iface->state]); 221 "%s in state %s (addr=0x%02x, len=%d, status=0x%02x)\n", errmsg,
222 scx200_acb_state_name[iface->state], iface->address_byte,
223 iface->len, status);
222 224
223 iface->state = state_idle; 225 iface->state = state_idle;
224 iface->result = -EIO; 226 iface->result = -EIO;