Skip to content

Commit

Permalink
[DellEMC] S6000 Disable Low power mode by default (sonic-net#4592)
Browse files Browse the repository at this point in the history
  • Loading branch information
santhosh-kt authored May 14, 2020
1 parent 9dea816 commit d90fdbf
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ remove_i2c_devices() {
done
}

# Enable/Disable low power mode on all QSFP ports
switch_board_qsfp_lpmode() {
case $1 in
"enable") value=0xffff
;;
"disable") value=0x0
;;
*) echo "s6000_platform: switch_board_qsfp_lpmode: invalid command $1!"
return
;;
esac
echo $value > /sys/bus/platform/devices/dell-s6000-cpld.0/qsfp_lpmode
}

install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
Expand All @@ -86,6 +100,7 @@ if [[ "$1" == "init" ]]; then
add_i2c_devices

/usr/local/bin/set-fan-speed 15000
switch_board_qsfp_lpmode "disable"
/usr/local/bin/reset-qsfp
elif [[ "$1" == "deinit" ]]; then
remove_i2c_devices
Expand Down

0 comments on commit d90fdbf

Please sign in to comment.