All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xie XiuQi <xiexiuqi@huawei.com>
To: Corey Minyard <minyard@acm.org>
Cc: <openipmi-developer@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] ipmi: fix seq number of bt msg in debug message
Date: Thu, 17 Apr 2014 17:25:30 +0800	[thread overview]
Message-ID: <534F9E0A.8050201@huawei.com> (raw)

The seq number of HOST2BMC message in debug message
is not the real seq number but the next seq number;
we could directly just use bt->write_data[2].

pre:
[99477.760284] BT: +++++++++++++++++ New command
[99477.760286] BT: NetFn/LUN CMD [1 data]: 28 10 0c
[99477.760296] BT: write 5 bytes seq=0x88 04 28 87 10 0c
                                 ^^^^^^^^       ^^
[99477.772078] BT: got 8 bytes seq=0x87 07 2c 87 10 00 f8 07 00
[99477.772091] BT: result 6 bytes: 2c 10 00 f8 07 00

post:
[99477.760284] BT: +++++++++++++++++ New command
[99477.760286] BT: NetFn/LUN CMD [1 data]: 28 10 0c
[99477.760296] BT: write 5 bytes seq=0x87 04 28 87 10 0c
                                 ^^^^^^^^       ^^
[99477.772078] BT: got 8 bytes seq=0x87 07 2c 87 10 00 f8 07 00
[99477.772091] BT: result 6 bytes: 2c 10 00 f8 07 00

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
 drivers/char/ipmi/ipmi_bt_sm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c
index f5e4cd7..1a2056f 100644
--- a/drivers/char/ipmi/ipmi_bt_sm.c
+++ b/drivers/char/ipmi/ipmi_bt_sm.c
@@ -341,7 +341,7 @@ static inline void write_all_bytes(struct si_sm_data *bt)

 	if (bt_debug & BT_DEBUG_MSG) {
 		printk(KERN_WARNING "BT: write %d bytes seq=0x%02X",
-			bt->write_count, bt->seq);
+			bt->write_count, bt->write_data[2]);
 		for (i = 0; i < bt->write_count; i++)
 			printk(" %02x", bt->write_data[i]);
 		printk("\n");
-- 
1.6.0.2



                 reply	other threads:[~2014-04-17  9:27 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=534F9E0A.8050201@huawei.com \
    --to=xiexiuqi@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.