Skip to content

Commit

Permalink
[Nokia][device-data] Modify the Nokia-7250IXRE platform specific rebo…
Browse files Browse the repository at this point in the history
…ot script (#14568)

Why I did it

When reboot the chassis by issuing "sudo reboot" on Supervisor card. The internal midplane communication xe0 should be shutdown to avoid double reboot on the linecard.
Added a udev link rule to disable the autoneg on AMD xgbe port Xe0 and Xe1 and make the setting in sync with the peer Broadcom greyhound ports.

How I did it

Modify the Nokia-7250IXRE specific reboot script on the Supervisor card to shutdown the internal interface xe0. Also move reboot linecard code to the top of the script to make sure the notification has been send to Linecard before shutdown the xe0 interface.
Introduced a new rule 80-net-by-driver.link to disable the autoneg on the AMD size. This change requires the latest NDK which contains the change to set the autoneg on the xe0 and xe1 port on the Greyhound.

Signed-off-by: mlok <[email protected]>
  • Loading branch information
mlok-nokia authored and mssonicbld committed May 17, 2023
1 parent d99999d commit 6335f61
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ rm -f /sys/firmware/efi/efivars/dump-*
touch /etc/opt/srlinux/devmgr_reboot_cause.done
rm -f /etc/opt/srlinux/reboot-cause.txt
sync
/sbin/reboot
exec /sbin/reboot $@
19 changes: 19 additions & 0 deletions device/nokia/x86_64-nokia_ixr7250e_sup-r0/89-net-by-driver.link
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Match]
Driver=amd-xgbe

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent
AutoNegotiation=no
BitsPerSecond=10G
Duplex=full
10 changes: 6 additions & 4 deletions device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

echo "Rebooting all Linecards"
python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()'
sleep 3
systemctl stop nokia-watchdog.service
sleep 2
echo "w" > /dev/watchdog
Expand All @@ -8,7 +10,7 @@ echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log
rm -f /sys/firmware/efi/efivars/dump-*
touch /etc/opt/srlinux/devmgr_reboot_cause.done
rm -f /etc/opt/srlinux/reboot-cause.txt
echo "Shutdown midplane"
ifconfig xe0 down
sync
echo "Rebooting all Linecards"
python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()'
/sbin/reboot
exec /sbin/reboot $@

0 comments on commit 6335f61

Please sign in to comment.