Skip to content

Commit ec50ec3

Browse files
leitaocminyard
authored andcommitted
ipmi: Use dev_warn_ratelimited() for incorrect message warnings
During BMC firmware upgrades on live systems, the ipmi_msghandler generates excessive "BMC returned incorrect response" warnings while the BMC is temporarily offline. This can flood system logs in large deployments. Replace dev_warn() with dev_warn_ratelimited() to throttle these warnings and prevent log spam during BMC maintenance operations. Signed-off-by: Breno Leitao <[email protected]> Message-ID: <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent f6f9760 commit ec50ec3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/char/ipmi/ipmi_msghandler.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,10 +4607,10 @@ static int handle_one_recv_msg(struct ipmi_smi *intf,
46074607
* The NetFN and Command in the response is not even
46084608
* marginally correct.
46094609
*/
4610-
dev_warn(intf->si_dev,
4611-
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
4612-
(msg->data[0] >> 2) | 1, msg->data[1],
4613-
msg->rsp[0] >> 2, msg->rsp[1]);
4610+
dev_warn_ratelimited(intf->si_dev,
4611+
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
4612+
(msg->data[0] >> 2) | 1, msg->data[1],
4613+
msg->rsp[0] >> 2, msg->rsp[1]);
46144614

46154615
goto return_unspecified;
46164616
}

0 commit comments

Comments
 (0)