Skip to content

Commit ba8df2a

Browse files
vharish02yxieca
authored andcommitted
[sonic-utilities/scripts] Fixing FP ports issue (sonic-net#268)
This commit fixes the Front Panel Ports not coming up during cold reboot and traffic being sent at line rate. The root cause was the PCIe bus error which was caused because of the host side not doing a gracefull shutdown calling bcm_shutdown and soc_shutdown. The fix will call the gracefull shutdown of syncd during reboot which in turns calls the bcm_shutdown and soc_shutdown. Additionally added the check to make sure the script will run only when it has root privileges otherwise it will quit. Verified the fix by running traffic at line rate 40G from Ixia and rebooted using script multiple times and traffic was successfully forwarded after every reboot. Signed-off-by: Harish Venkatraman <[email protected]>
1 parent c8b9c0e commit ba8df2a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/reboot

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#! /bin/bash
22

3+
# Check root privileges
4+
if [[ "$EUID" -ne 0 ]]
5+
then
6+
echo "Please run as root" >&2
7+
exit 1
8+
fi
9+
310
function stop_sonic_services()
411
{
512
echo "Stopping syncd..."
@@ -13,8 +20,10 @@ PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
1320
DEVPATH="/usr/share/sonic/device"
1421
REBOOT="platform_reboot"
1522

23+
# Stop syncd gracefully.
24+
stop_sonic_services
25+
1626
if [ -x ${DEVPATH}/${PLATFORM}/${REBOOT} ]; then
17-
stop_sonic_services
1827
sync
1928
sleep 3
2029
echo "Rebooting with platform ${PLATFORM} specific tool ..."

0 commit comments

Comments
 (0)