From 332169e61e171331c07dfaacdb8e1f7b63aaeaac Mon Sep 17 00:00:00 2001 From: noaOrMlnx Date: Tue, 4 Jun 2024 14:39:14 +0300 Subject: [PATCH] Add W/A to not fail when hw_reset to SFP module --- platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 34b5fe8004ba..4682685b1e93 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -1440,6 +1440,14 @@ def get_state_machine(cls): @classmethod def action_on_start(cls, sfp): + + # a W/A to avoid setting hw_reset for service ports from type SFP. + # this W/A is relevant only for moose and hippo systems, and we will have it until FW will provide their fix. + if sfp.sdk_index >= 64: + logger.log_info(f'SFP {sfp.sdk_index} should be automatically FW control. Setting it as FW control as a W/A') + sfp.on_event(EVENT_FW_CONTROL) + return + if sfp.get_control_type() == SFP_FW_CONTROL: logger.log_info(f'SFP {sfp.sdk_index} is already FW control, probably in warm reboot') sfp.on_event(EVENT_FW_CONTROL)