Skip to content

Commit

Permalink
Module detection flow update to tag copper passive cables as software…
Browse files Browse the repository at this point in the history
… control (sonic-net#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.
  • Loading branch information
tshalvi authored and Aidan Gallagher committed Nov 16, 2024
1 parent 4d06222 commit 4aef811
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4aef811

Please sign in to comment.