aboutsummaryrefslogtreecommitdiff
path: root/hw/bt.c
diff options
context:
space:
mode:
authorVipin K Parashar <vipin@linux.vnet.ibm.com>2016-02-27 02:13:26 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-03-07 14:35:54 +1100
commit361000f61f3691cc5b970587366f8154610d2771 (patch)
treea8927194546a3c473846996bf65a82114babd0a8 /hw/bt.c
parentfe4bf686b88e25f8b74e3f712dadb8ca3ea133a3 (diff)
downloadskiboot-361000f61f3691cc5b970587366f8154610d2771.zip
skiboot-361000f61f3691cc5b970587366f8154610d2771.tar.gz
skiboot-361000f61f3691cc5b970587366f8154610d2771.tar.bz2
ipmi: Log exact NetFn value in OPAL logs
As per IPMI message format NetFn value in present in first 6 bits while last 2 bits contain LUN value. This needs to be taken care while printing NetFn value in OPAL logs which is useful while debugging fails. [root@fir01 /]# ipmitool raw 0x0a 0x48 47 b1 d0 56 [root@fir01 /]# >From OPAL Logs --------------- [133969609199,7] BT: seq 0x3d netfn 0x0a cmd 0x48: Message sent to host [133975465455,7] BT: seq 0x3d netfn 0x0a cmd 0x48: IPMI MSG done >From BMC Logs -------------- IPMIMain: [693 WARNING][corecmdselect.c:913] Request: Channel:f; Netfn:a; Cmd:48; IPMIMain: [693 INFO][corecmdselect.c:924] Response: Channel:f; Netfn:a; Cmd:48; Data:0 47 b1 d0 56 Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/bt.c')
-rw-r--r--hw/bt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/bt.c b/hw/bt.c
index 3325f69..ca8bd1e 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -15,6 +15,7 @@
*/
#define pr_fmt(fmt) "BT: " fmt
+
#include <skiboot.h>
#include <lpc.h>
#include <lock.h>
@@ -80,7 +81,7 @@
#define _BT_Q_LOG(level, msg, fmt, args...) \
do { if (msg) \
prlog(level, "seq 0x%02x netfn 0x%02x cmd 0x%02x: " fmt "\n", \
- (msg)->seq, (msg)->ipmi_msg.netfn, (msg)->ipmi_msg.cmd, ##args); \
+ (msg)->seq, ((msg)->ipmi_msg.netfn >> 2), (msg)->ipmi_msg.cmd, ##args); \
else \
prlog(level, "seq 0x?? netfn 0x?? cmd 0x??: " fmt "\n", ##args); \
} while(0)
@@ -346,7 +347,7 @@ static void bt_get_resp(void)
if (!bt_msg) {
/* A response to a message we no longer care about. */
prlog(PR_INFO, "Nobody cared about a response to an BT/IPMI message"
- "(seq 0x%02x netfn 0x%02x cmd 0x%02x)\n", seq, netfn, cmd);
+ "(seq 0x%02x netfn 0x%02x cmd 0x%02x)\n", seq, (netfn >> 2), cmd);
bt_flush_msg();
return;
}