Skip to content

Commit 22d17da

Browse files
paavaananlguohan
paavaanan
authored andcommitted
[devices]: Watchdog enable/disable in DellEMC S6100 (#2730)
1 parent 1f51692 commit 22d17da

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install

+2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ common/fstrim.timer etc/systemd/system
66
common/fstrim.service etc/systemd/system
77
common/platform_reboot usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
88
s6100/scripts/platform_sensors.py usr/local/bin
9+
s6100/scripts/platform_watchdog_enable.sh usr/local/bin
10+
s6100/scripts/platform_watchdog_disable.sh usr/local/bin
911
s6100/scripts/sensors usr/bin
1012
s6100/systemd/platform-modules-s6100.service etc/systemd/system
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
#This script is used to disable SMF Watchdog Timer
3+
4+
wd_status=-1
5+
enabled=0
6+
7+
# Disable Watchdog if enabled
8+
wd_status=$(io_rd_wr.py --get --offset 0x207 | cut -d " " -f3)
9+
10+
if [[ $wd_status -eq $enabled ]]; then
11+
echo "Disabling Watchdog Timer.."
12+
io_rd_wr.py --set --val 1 --offset 0x207
13+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#This script is used to enable SMF Watchdog Timer
3+
4+
# Set watchdog to 180 seconds
5+
io_rd_wr.py --set --val 3 --offset 0x206
6+
7+
# Enable watchdog timer
8+
io_rd_wr.py --set --val 0 --offset 0x207

platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh

+5
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ if [[ "$1" == "init" ]]; then
226226
modprobe dell_s6100_iom_cpld
227227
modprobe dell_s6100_lpc
228228

229+
# Disable Watchdog Timer
230+
if [[ -e /usr/local/bin/platform_watchdog_disable.sh ]]; then
231+
exec /usr/local/bin/platform_watchdog_disable.sh
232+
fi
233+
229234
cpu_board_mux "new_device"
230235
switch_board_mux "new_device"
231236
sys_eeprom "new_device"

0 commit comments

Comments
 (0)