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]>
---
 drivers/char/ipmi/ipmi_msghandler.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c 
b/drivers/char/ipmi/ipmi_msghandler.c
index 064944ae9fdc3..8e9050f99e9ef 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -4607,10 +4607,10 @@ static int handle_one_recv_msg(struct ipmi_smi *intf,
                 * The NetFN and Command in the response is not even
                 * marginally correct.
                 */
-               dev_warn(intf->si_dev,
-                        "BMC returned incorrect response, expected netfn %x 
cmd %x, got netfn %x cmd %x\n",
-                        (msg->data[0] >> 2) | 1, msg->data[1],
-                        msg->rsp[0] >> 2, msg->rsp[1]);
+               dev_warn_ratelimited(intf->si_dev,
+                                    "BMC returned incorrect response, expected 
netfn %x cmd %x, got netfn %x cmd %x\n",
+                                    (msg->data[0] >> 2) | 1, msg->data[1],
+                                    msg->rsp[0] >> 2, msg->rsp[1]);
 
                goto return_unspecified;
        }

---
base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
change-id: 20250710-ipmi_ratelimit-7e1af5170c57

Best regards,
--  
Breno Leitao <[email protected]>



_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to