From 6245c0d1201d1a72c92f071915cb67821646361e Mon Sep 17 00:00:00 2001 From: noaOrMlnx Date: Tue, 28 May 2024 15:57:24 +0300 Subject: [PATCH] Add a call to apply app0 config before DP INIT --- sonic-xcvrd/tests/test_xcvrd.py | 1 + sonic-xcvrd/xcvrd/xcvrd.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sonic-xcvrd/tests/test_xcvrd.py b/sonic-xcvrd/tests/test_xcvrd.py index 82296f59e..80e4a97c9 100644 --- a/sonic-xcvrd/tests/test_xcvrd.py +++ b/sonic-xcvrd/tests/test_xcvrd.py @@ -1297,6 +1297,7 @@ def test_CmisManagerTask_task_worker(self, mock_chassis, mock_get_status_tbl): mock_xcvr_api = MagicMock() mock_xcvr_api.set_datapath_deinit = MagicMock(return_value=True) mock_xcvr_api.set_datapath_init = MagicMock(return_value=True) + mock_xcvr_api.apply_app0_configuration = MagicMock(return_value=True) mock_xcvr_api.tx_disable_channel = MagicMock(return_value=True) mock_xcvr_api.set_lpmode = MagicMock(return_value=True) mock_xcvr_api.set_application = MagicMock(return_value=True) diff --git a/sonic-xcvrd/xcvrd/xcvrd.py b/sonic-xcvrd/xcvrd/xcvrd.py index 9be206abc..de4325fee 100644 --- a/sonic-xcvrd/xcvrd/xcvrd.py +++ b/sonic-xcvrd/xcvrd/xcvrd.py @@ -1474,6 +1474,10 @@ def task_worker(self): # D.2.2 Software Deinitialization api.set_datapath_deinit(host_lanes_mask) + self.log_info("Applying App0 configuration for port {}".format(lport)) + if not api.apply_app0_configuration(): + self.log_notice("{}: Could not apply application 0 configurations") + # D.1.3 Software Configuration and Initialization media_lanes_mask = self.port_dict[lport]['media_lanes_mask'] if not api.tx_disable_channel(media_lanes_mask, True):