From 2841c7b4b4dd7854f953dad451d92962ecc18ac0 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Mon, 14 Mar 2022 07:44:43 +0000 Subject: [PATCH] sonic-platform-modules-cel dx010: speed up dx010 platform init script * Remove installing of python2 sonic platform wheel for dx010 * Optimize dx010 sonic platform init script to speed up init process * Fix issue #10152: [warm-upgrade][202012] Slow Celestica platform init in rc.local causes lacp-teardown Signed-off-by: Eric Zhu --- .../debian/platform-modules-dx010.init | 15 +++++++-------- .../debian/platform-modules-dx010.install | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.init b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.init index 21587bfbd3fd..12f8fc61f2ea 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.init +++ b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.init @@ -61,19 +61,19 @@ start) [ $found -eq 0 ] && echo "cannot find iSMT" && exit 1 i2cset -y ${devnum} 0x70 0x10 0x00 0x01 i - sleep 1 + sleep 0.1 # Attach PCA9548 0x71 Channel Extender for Main Board echo pca9548 0x71 > /sys/bus/i2c/devices/i2c-${devnum}/new_device - sleep 1 + sleep 0.1 # Attach PCA9548 0x73 Channel Extender for CPU Board echo pca9548 0x73 > /sys/bus/i2c/devices/i2c-${devnum}/new_device - sleep 1 + sleep 0.1 # Attach PCA9548 0x77 Channel Extender for Fan's EEPROMs echo pca9548 0x77 > /sys/bus/i2c/devices/i2c-${devnum}/new_device - sleep 1 + sleep 0.1 # Attach syseeprom echo 24lc64t 0x50 > /sys/bus/i2c/devices/i2c-12/new_device @@ -106,7 +106,7 @@ start) echo pca9505 0x20 > /sys/bus/i2c/devices/i2c-17/new_device modprobe dx010_cpld - sleep 2 + sleep 1 # Export platform gpio sysfs export_gpio 10 "in" # Fan 1 present @@ -148,15 +148,14 @@ start) done bus_en=8 - sleep 1 cfg_r=`i2cget -y -f 8 0x60 0xD1` ((cfg_w=$cfg_r+$bus_en)) i2cset -y -f 8 0x60 0xD1 $cfg_w - sleep 1 + sleep 0.1 cfg_r=`i2cget -y -f 9 0x20 0xD1` ((cfg_w=$cfg_r+$bus_en)) i2cset -y -f 9 0x20 0xD1 $cfg_w - sleep 1 + sleep 0.1 /bin/sh /usr/local/bin/platform_api_mgnt.sh init diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.install b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.install index 98c17e55a980..4698507c6b9d 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.install +++ b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.install @@ -4,6 +4,5 @@ dx010/systemd/platform-modules-dx010.service lib/systemd/system dx010/scripts/fancontrol.sh etc/init.d dx010/scripts/fancontrol.service lib/systemd/system services/fancontrol/fancontrol usr/local/bin -dx010/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0 dx010/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0 services/platform_api/platform_api_mgnt.sh usr/local/bin