Skip to contentSkip to conversation

i2c/scx200_acb: Provide more information on bus errors

PATCH New Jean Delvare 1 participant 1 message Aug 29, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c/scx200_acb: Provide more information on bus errors

From: Willy Tarreau <[email protected]>

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.

---
 drivers/i2c/busses/scx200_acb.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/i2c/busses/scx200_acb.c +4 -2
@@ -217,8 +217,10 @@ static void scx200_acb_machine(struct sc
 	return;
 
  error:
-	dev_err(&iface->adapter.dev, "%s in state %s\n", errmsg,
-		scx200_acb_state_name[iface->state]);
+	dev_err(&iface->adapter.dev,
+		"%s in state %s (addr=0x%02x, len=%d, status=0x%02x)\n", errmsg,
+		scx200_acb_state_name[iface->state], iface->address_byte,
+		iface->len, status);
 
 	iface->state = state_idle;
 	iface->result = -EIO;
Signature · 1 line
Jean Delvare