Channels remain static unless the BMC firmware changes.
Therefore, rescanning is unnecessary while they are marked
ready and no BMC update has occurred.

Signed-off-by: Jinhui Guo <[email protected]>
---
 drivers/char/ipmi/ipmi_msghandler.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c 
b/drivers/char/ipmi/ipmi_msghandler.c
index 536484b8e52d..db8ef2e46488 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -3439,6 +3439,10 @@ static int __scan_channels(struct ipmi_smi *intf,
                intf->channels_ready = false;
        }
 
+       /* Skip channel scan if channels are already marked ready */
+       if (intf->channels_ready)
+               return 0;
+
        if (ipmi_version_major(id) > 1
                        || (ipmi_version_major(id) == 1
                            && ipmi_version_minor(id) >= 5)) {
-- 
2.20.1



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

Reply via email to