From 4aef81189f9f30b94365c1bbd7741335eeda7e55 Mon Sep 17 00:00:00 2001 From: Tomer Shalvi <116184476+tshalvi@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:30:37 +0200 Subject: [PATCH] Module detection flow update to tag copper passive cables as software control (#19476) - Why I did it On Mellanox platforms, currently only CMIS active ports can be controlled by the SW, and all copper modules are controlled by FW. We want to let Sonic control passive copper modules as well, for CMIS and SFF (sff8636 and sff8436). - How I did it I updated the module detection flow to tag CMIS and SFF passive modules as SW control. - How to verify it Manual tests. --- platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index ddaa60d2860e..e2c6d63dc7a3 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -1053,7 +1053,10 @@ def is_supported_for_software_control(self, xcvr_api): Returns: bool: True if the api object supports software control """ - return self.is_cmis_api(xcvr_api) and not xcvr_api.is_flat_memory() + if xcvr_api.is_flat_memory(): + return self.is_cmis_api(xcvr_api) or self.is_sff_api(xcvr_api) + else: + return self.is_cmis_api(xcvr_api) def check_power_capability(self): """Check module max power with cage power limit