This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/platform/mellanox/mlnx-platform-api/sonic_platform
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
..
__init__.py Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
chassis.py skip hw reboot cause if warm/fast reboot found from the proc cmdline (#13378) 2023-01-17 13:21:31 -08:00
component.py [Mellanox] Enhance Python3 support for platform API (#7410) (#7910) 2021-06-18 09:46:41 -07:00
device_data.py [Mellanox] Adopt single way to get fan direction for all ASIC types (#7386) 2021-05-05 09:34:25 -07:00
eeprom.py [Mellanox] [202012] Backport 'Read EEPROM data from DB if possible'(7808) to 202012 (#7928) 2021-06-23 18:09:53 +03:00
fan_drawer.py [Mellanox] Enhance Python3 support for platform API (#7410) (#7910) 2021-06-18 09:46:41 -07:00
fan.py [Mellanox] Optimize thermal policies (#9665) 2022-01-19 11:42:55 +02:00
led.py [Mellanox] [202012] Allow user to set LED to orange (#9514) 2021-12-13 16:04:06 -08:00
pcie.py [Mellanox][Pcie] Fix issue on pcied with an id that contains only decimal digits was treated as a decimal number (#8309) 2021-08-05 15:22:48 +00:00
platform.py [Mellanox] Enhance Python3 support for platform API (#7410) (#7910) 2021-06-18 09:46:41 -07:00
psu.py [Mellanox] Enhance Python3 support for platform API (#7410) (#7910) 2021-06-18 09:46:41 -07:00
sfp_event.py [202012] [Mellanox] Fix issue: cannot lable port for logical port is logical port number larger than 64 (#13709) 2023-02-23 08:27:21 +02:00
sfp.py [Mellanox]Fix lpmode set when logical port is larger than 64 (#14138) (#14202) 2023-03-14 10:19:02 -07:00
thermal_actions.py [Mellanox] Optimize thermal policies (#9665) 2022-01-19 11:42:55 +02:00
thermal_conditions.py [Mellanox] Optimize thermal policies (#9665) 2022-01-19 11:42:55 +02:00
thermal_infos.py [Mellanox] Fan speed should not be 100% when PSU is powered off (#9258) 2021-12-01 02:28:37 +00:00
thermal_manager.py [Mellanox] Optimize thermal policies (#9665) 2022-01-19 11:42:55 +02:00
thermal.py [Mellanox] [202012] Fix issue: 4600C is using wrong thermal profile (#10258) 2022-03-20 10:31:59 +02:00
utils.py [Mellanox] [202012] Backport 'Read EEPROM data from DB if possible'(7808) to 202012 (#7928) 2021-06-23 18:09:53 +03:00
watchdog.py [WARM-REBOOT] fix issue of watchdog on simx when executing warm-reboot command (#8132) 2021-07-20 10:18:17 +00:00