From 73e6dddd17b538e859e5ec65fc648653cd86061f Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Thu, 3 Dec 2020 19:07:10 -0800 Subject: [PATCH] [xcvrd] replace check_active_linked_tor_side api to check_mux_direction (#131) Summary: This PR provides replaces the logic to check mux_direction on the y_cable by checking the mux_direction register instead of actively linked and routing TOR register Approach added the changes in y_cable_helper.py by replacing the API What is the motivation for this PR? check_mux_direction is required as per design to replace the active_linked_tor_side active_linked_tor_side -> check_mux_direction check_mux_direction will be utlized as for establishing mux direction explicitly Signed-off-by: vaibhav-dahiya --- sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py b/sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py index e458de73764f..29118527af7f 100644 --- a/sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py +++ b/sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py @@ -176,7 +176,7 @@ def update_appdb_port_mux_cable_response_table(logical_port_name, asic_index, ap "Error: Could not get read side for mux cable port probe command logical port {} and physical port {}".format(logical_port_name, physical_port)) return - active_side = y_cable.check_active_linked_tor_side(physical_port) + active_side = y_cable.check_mux_direction(physical_port) if active_side is None: @@ -234,7 +234,7 @@ def read_y_cable_and_update_statedb_port_tbl(logical_port_name, mux_config_tbl): "Error: Could not establish the read side for Y cable port {}".format(logical_port_name)) return - active_side = y_cable.check_active_linked_tor_side(physical_port) + active_side = y_cable.check_mux_direction(physical_port) if active_side is None or active_side not in y_cable_switch_state_values: read_side = active_side = -1 update_table_mux_status_for_statedb_port_tbl(