Skip to content

Commit

Permalink
i2c/scx200_acb: Provide more information on bus errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Willy Tarreau authored and Jean Delvare committed Sep 18, 2009
1 parent 2bb5095 commit fce96f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ static void scx200_acb_machine(struct scx200_acb_iface *iface, u8 status)
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;
Expand Down

0 comments on commit fce96f3

Please sign in to comment.