Skip to content

Commit

Permalink
[Mellanox] Update SN2201 sai profile and platform reboot script (#10978)
Browse files Browse the repository at this point in the history
- Why I did it
1. SN2201 sai profile needs to be updated according to the latest hardware.
2. In the reboot script, need to use the common symbol link of the power_cycle sysfs instead of directly accessing it due to SN2201 sysfs is different than other platforms.
3. echo 1 > $SYSFS_PWR_CYCLE will trigger the reboot immediately, the following sleep 3 and echo 0 > $SYSFS_PWR_CYCLE will never be executed, can be removed.

- How I did it
1. Replace the SN2201 sai profile with the latest one.
2. In the platform_reboot script, replace the direct sysfs path with the symbol link path.
3. Remove the redundant code from platform_reboot

- How to verify it
Perform reboot on all the Nvidia platforms, and check all can be rebooted successfully.

Signed-off-by: Kebo Liu <[email protected]>
  • Loading branch information
keboliu authored and yxieca committed Jun 9, 2022
1 parent 00d04dc commit 7af4efa
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 67 deletions.
4 changes: 1 addition & 3 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare -r EXIT_ERROR="1"

declare -r PENDING_COMPONENT_FW="/usr/bin/install-pending-fw.py"
declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh"
declare -r SYSFS_PWR_CYCLE="/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle"
declare -r SYSFS_PWR_CYCLE="/var/run/hw-management/system/pwr_cycle"

FORCE_REBOOT="no"

Expand All @@ -24,8 +24,6 @@ function SafePwrCycle() {
sync ; sync
umount -fa > /dev/null 2&>1
echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE
}

ParseArguments "$@"
Expand Down
Loading

0 comments on commit 7af4efa

Please sign in to comment.