Commit fac56b7d authored by Corey Minyard's avatar Corey Minyard

ipmi: Check error code before processing BMC response

In case an error did occur, print out useful information.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 17a42627
...@@ -2369,6 +2369,13 @@ static void bmc_device_id_handler(struct ipmi_smi *intf, ...@@ -2369,6 +2369,13 @@ static void bmc_device_id_handler(struct ipmi_smi *intf,
return; return;
} }
if (msg->msg.data[0]) {
dev_warn(intf->si_dev, "device id fetch failed: 0x%2.2x\n",
msg->msg.data[0]);
intf->bmc->dyn_id_set = 0;
goto out;
}
rv = ipmi_demangle_device_id(msg->msg.netfn, msg->msg.cmd, rv = ipmi_demangle_device_id(msg->msg.netfn, msg->msg.cmd,
msg->msg.data, msg->msg.data_len, &intf->bmc->fetch_id); msg->msg.data, msg->msg.data_len, &intf->bmc->fetch_id);
if (rv) { if (rv) {
...@@ -2384,7 +2391,7 @@ static void bmc_device_id_handler(struct ipmi_smi *intf, ...@@ -2384,7 +2391,7 @@ static void bmc_device_id_handler(struct ipmi_smi *intf,
smp_wmb(); smp_wmb();
intf->bmc->dyn_id_set = 1; intf->bmc->dyn_id_set = 1;
} }
out:
wake_up(&intf->waitq); wake_up(&intf->waitq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment