linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Willy Tarreau <wtarreau-w2o5dE7VsCkiY7fawQvujQ@public.gmane.org>
Subject: [PATCH] i2c/scx200_acb: Provide more information on bus errors
Date: Sat, 29 Aug 2009 21:18:38 +0200	[thread overview]
Message-ID: <20090829211838.6b6c67fd@hyperion.delvare> (raw)

From: Willy Tarreau <wtarreau-w2o5dE7VsCkiY7fawQvujQ@public.gmane.org>

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-w2o5dE7VsCkiY7fawQvujQ@public.gmane.org>
Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
---
 drivers/i2c/busses/scx200_acb.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- linux-2.6.31-rc8.orig/drivers/i2c/busses/scx200_acb.c	2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.31-rc8/drivers/i2c/busses/scx200_acb.c	2009-08-29 20:44:33.000000000 +0200
@@ -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;


-- 
Jean Delvare

                 reply	other threads:[~2009-08-29 19:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090829211838.6b6c67fd@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wtarreau-w2o5dE7VsCkiY7fawQvujQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).