From 399bf4cc7eec097ed2cd3be181f863944e4dac19 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Thu, 4 Jun 2026 07:13:12 +0000 Subject: [PATCH 1/2] Fix BMC import issue Signed-off-by: Stephen Sun --- platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index e38d7064ce8..16f8c8eaea6 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -933,7 +933,6 @@ def initialize_components(self): # Initialize BMC and its components if DeviceDataManager.is_platform_with_bmc(): - from .bmc import BMC self.initialize_bmc() def get_num_components(self): @@ -1230,6 +1229,7 @@ def is_replaceable(self): return False def initialize_bmc(self): + from .bmc import BMC if self._bmc_initialized: return self._bmc = BMC.get_instance() From 10e61667e10c41493cac494333998b91104f6861 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Thu, 4 Jun 2026 07:49:06 +0000 Subject: [PATCH 2/2] Fix review comment Signed-off-by: Stephen Sun --- platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index 16f8c8eaea6..696ca28917b 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -1229,9 +1229,9 @@ def is_replaceable(self): return False def initialize_bmc(self): - from .bmc import BMC if self._bmc_initialized: return + from .bmc import BMC self._bmc = BMC.get_instance() if self._bmc is not None: try: