sonic-buildimage/platform/mellanox/mlnx-platform-api
Sudharsan Dhamal Gopalarathnam 79548e472d
[Mellanox]Fix lpmode set when logical port is larger than 64 (#14138) (#14202)
Manual cherry-pick of https://github.com/sonic-net/sonic-buildimage/pull/14138
- Why I did it
In sfplpm API, the number of logical ports is hardcoded as 64. When a system contains more port than this, the SDK APIs would fail with a syslog as below

Mar 7 03:53:58.105980 r-leopard-58 ERR syncd#SDK: [MGMT_LIB.ERR] Slot [0] Module [0] has logport [0x00010069] in enabled state
Mar 7 03:53:58.105980 r-leopard-58 ERR syncd#SDK: [SDK_MGMT_LIB.ERR] Failed in __sdk_mgmt_phy_module_pwr_attr_set, error: Internal Error
Mar 7 03:53:58.106118 r-leopard-58 ERR pmon#-c: Error occurred when setting power mode for SFP module 0, slot 0, error code 1

- How I did it 
Remove the hardcoded value of 64. Obtained the number of logical ports from SDK

- How to verify it 
Manual testing
2023-03-14 10:19:02 -07:00
..
sonic_platform [Mellanox]Fix lpmode set when logical port is larger than 64 (#14138) (#14202) 2023-03-14 10:19:02 -07:00
tests [Mellanox] Optimize thermal policies (#9665) 2022-01-19 11:42:55 +02:00
.gitignore Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
pytest.ini Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
setup.cfg Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
setup.py [Mellanox] Add python3 support for Mellanox platform API (#6175) 2020-12-11 10:51:31 -08:00