projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17a4262
)
ipmi: Check error code before processing BMC response
author
Corey Minyard
<cminyard@mvista.com>
Thu, 30 Sep 2021 13:50:06 +0000
(08:50 -0500)
committer
Corey Minyard
<cminyard@mvista.com>
Tue, 5 Oct 2021 11:54:16 +0000
(06:54 -0500)
In case an error did occur, print out useful information.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msghandler.c
index a08f53f208bfeaabb23e21ebbe77fa7c3d6697b4..13988f88f1b05a14d3f40bf4188a9d771b37130a 100644
(file)
--- a/
drivers/char/ipmi/ipmi_msghandler.c
+++ b/
drivers/char/ipmi/ipmi_msghandler.c
@@
-2369,6
+2369,13
@@
static void bmc_device_id_handler(struct ipmi_smi *intf,
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,
msg->msg.data, msg->msg.data_len, &intf->bmc->fetch_id);
if (rv) {
@@
-2384,7
+2391,7
@@
static void bmc_device_id_handler(struct ipmi_smi *intf,
smp_wmb();
intf->bmc->dyn_id_set = 1;
}
-
+out:
wake_up(&intf->waitq);
}