diff --git a/device/alibaba/x86_64-alibaba_as13-32h-cl-r0/plugins/fwmgrutil.py b/device/alibaba/x86_64-alibaba_as13-32h-cl-r0/plugins/fwmgrutil.py index 74cf35724387..335e41ffe9d9 100644 --- a/device/alibaba/x86_64-alibaba_as13-32h-cl-r0/plugins/fwmgrutil.py +++ b/device/alibaba/x86_64-alibaba_as13-32h-cl-r0/plugins/fwmgrutil.py @@ -37,12 +37,6 @@ def __init__(self): self.switchboard_cpld3_path = "/sys/devices/platform/%s.switchboard/CPLD3/getreg" % self.platform_name self.switchboard_cpld4_path = "/sys/devices/platform/%s.switchboard/CPLD4/getreg" % self.platform_name self.bmc_pwd_path = "/usr/local/etc/bmcpwd" - self.bmc_wdt_ctrl = "/usr/local/etc/bmc_wdt.sh" - self.bmc_wdt_trig = False - - def __del__(self): - if self.bmc_wdt_trig: - self.__bmc_watchdog_handler("enable") def __get_register_value(self, path, register): cmd = "echo {1} > {0}; cat {0}".format(path, register) @@ -78,24 +72,6 @@ def __fpga_pci_rescan(self): os.system('modprobe switchboard_fpga') return 0 - def __bmc_watchdog_handler(self, state): - command = "systemctl start bmc_wdt.timer" - if state == "disable": - command = "systemctl stop bmc_wdt.timer;sh % s stop" % self.bmc_wdt_ctrl - p = subprocess.Popen(command, shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - raw_data, err = p.communicate() - json_object = {} - try: - json_object = json.loads(raw_data) - except: - pass - finally: - if json_object.get('result') != "success" and err != '': - print("Warning: %s" % err) - return False - return True - def get_bmc_pass(self): if os.path.exists(self.bmc_pwd_path): with open(self.bmc_pwd_path) as file: @@ -272,7 +248,6 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None): or 'cpld_fan_come_board', etc. If None, upgrade all CPLD/FPGA firmware. for fw_type 'bios' and 'bmc', value should be one of 'master' or 'slave' or 'both' """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() @@ -628,7 +603,6 @@ def firmware_program(self, fw_type, fw_path, fw_extra=None): or self.firmware_program("FPGA", "/fpga.bin") """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() diff --git a/device/alibaba/x86_64-alibaba_as13-48f8h-cl-r0/plugins/fwmgrutil.py b/device/alibaba/x86_64-alibaba_as13-48f8h-cl-r0/plugins/fwmgrutil.py index abecfdcf298b..73f2fb4d38fb 100644 --- a/device/alibaba/x86_64-alibaba_as13-48f8h-cl-r0/plugins/fwmgrutil.py +++ b/device/alibaba/x86_64-alibaba_as13-48f8h-cl-r0/plugins/fwmgrutil.py @@ -37,12 +37,6 @@ def __init__(self): self.switchboard_cpld3_path = "/sys/devices/platform/%s.switchboard/CPLD3/getreg" % self.platform_name self.switchboard_cpld4_path = "/sys/devices/platform/%s.switchboard/CPLD4/getreg" % self.platform_name self.bmc_pwd_path = "/usr/local/etc/bmcpwd" - self.bmc_wdt_ctrl = "/usr/local/etc/bmc_wdt.sh" - self.bmc_wdt_trig = False - - def __del__(self): - if self.bmc_wdt_trig: - self.__bmc_watchdog_handler("enable") def __get_register_value(self, path, register): cmd = "echo {1} > {0}; cat {0}".format(path, register) @@ -78,24 +72,6 @@ def __fpga_pci_rescan(self): os.system('modprobe switchboard_fpga') return 0 - def __bmc_watchdog_handler(self, state): - command = "systemctl start bmc_wdt.timer" - if state == "disable": - command = "systemctl stop bmc_wdt.timer;sh % s stop" % self.bmc_wdt_ctrl - p = subprocess.Popen(command, shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - raw_data, err = p.communicate() - json_object = {} - try: - json_object = json.loads(raw_data) - except: - pass - finally: - if json_object.get('result') != "success" and err != '': - print("Warning: %s" % err) - return False - return True - def get_bmc_pass(self): if os.path.exists(self.bmc_pwd_path): with open(self.bmc_pwd_path) as file: @@ -272,7 +248,6 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None): or 'cpld_fan_come_board', etc. If None, upgrade all CPLD/FPGA firmware. for fw_type 'bios' and 'bmc', value should be one of 'master' or 'slave' or 'both' """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() @@ -628,7 +603,6 @@ def firmware_program(self, fw_type, fw_path, fw_extra=None): or self.firmware_program("FPGA", "/fpga.bin") """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() diff --git a/device/alibaba/x86_64-alibaba_as23-128h-cl-r0/plugins/fwmgrutil.py b/device/alibaba/x86_64-alibaba_as23-128h-cl-r0/plugins/fwmgrutil.py index 4ccc2fe040eb..54e89abf15a9 100644 --- a/device/alibaba/x86_64-alibaba_as23-128h-cl-r0/plugins/fwmgrutil.py +++ b/device/alibaba/x86_64-alibaba_as23-128h-cl-r0/plugins/fwmgrutil.py @@ -37,12 +37,6 @@ def __init__(self): self.switchboard_cpld3_path = "/sys/devices/platform/%s.switchboard/CPLD3/getreg" % self.platform_name self.switchboard_cpld4_path = "/sys/devices/platform/%s.switchboard/CPLD4/getreg" % self.platform_name self.bmc_pwd_path = "/usr/local/etc/bmcpwd" - self.bmc_wdt_ctrl = "/usr/local/etc/bmc_wdt.sh" - self.bmc_wdt_trig = False - - def __del__(self): - if self.bmc_wdt_trig: - self.__bmc_watchdog_handler("enable") def __get_register_value(self, path, register): cmd = "echo {1} > {0}; cat {0}".format(path, register) @@ -78,24 +72,6 @@ def __fpga_pci_rescan(self): os.system('modprobe switchboard_fpga') return 0 - def __bmc_watchdog_handler(self, state): - command = "systemctl start bmc_wdt.timer" - if state == "disable": - command = "systemctl stop bmc_wdt.timer;sh % s stop" % self.bmc_wdt_ctrl - p = subprocess.Popen(command, shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - raw_data, err = p.communicate() - json_object = {} - try: - json_object = json.loads(raw_data) - except: - pass - finally: - if json_object.get('result') != "success" and err != '': - print("Warning: %s" % err) - return False - return True - def get_bmc_pass(self): if os.path.exists(self.bmc_pwd_path): with open(self.bmc_pwd_path) as file: @@ -272,7 +248,6 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None): or 'cpld_fan_come_board', etc. If None, upgrade all CPLD/FPGA firmware. for fw_type 'bios' and 'bmc', value should be one of 'master' or 'slave' or 'both' """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() @@ -628,7 +603,6 @@ def firmware_program(self, fw_type, fw_path, fw_extra=None): or self.firmware_program("FPGA", "/fpga.bin") """ - self.bmc_wdt_trig = self.__bmc_watchdog_handler("disable") fw_type = fw_type.lower() upgrade_list = [] bmc_pwd = self.get_bmc_pass() diff --git a/platform/broadcom/sonic-platform-modules-cel b/platform/broadcom/sonic-platform-modules-cel index f7ee450c53d4..1a122ff73f59 160000 --- a/platform/broadcom/sonic-platform-modules-cel +++ b/platform/broadcom/sonic-platform-modules-cel @@ -1 +1 @@ -Subproject commit f7ee450c53d4ac4904fab7d753bd5e3a1887b22e +Subproject commit 1a122ff73f592a6cef274056d175765295505a41