Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Willy Tarreau and committed by
Jean Delvare
fce96f3e 2bb5095a

+4 -2
+4 -2
drivers/i2c/busses/scx200_acb.c
··· 217 217 return; 218 218 219 219 error: 220 - dev_err(&iface->adapter.dev, "%s in state %s\n", errmsg, 221 - scx200_acb_state_name[iface->state]); 220 + dev_err(&iface->adapter.dev, 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 225 iface->state = state_idle; 224 226 iface->result = -EIO;