diff --git a/sonic-xcvrd/scripts/xcvrd b/sonic-xcvrd/scripts/xcvrd index 0fd8a7e03..d5b69b9e0 100644 --- a/sonic-xcvrd/scripts/xcvrd +++ b/sonic-xcvrd/scripts/xcvrd @@ -550,7 +550,7 @@ def get_media_val_str_from_dict(media_dict): media_str += lane_separator return media_str -def get_media_val_str(num_logical_ports, lane_dict): +def get_media_val_str(num_logical_ports, lane_dict, logical_idx): lane_str = "lane" logical_media_dict = {} num_lanes_on_port = len(lane_dict) @@ -559,7 +559,7 @@ def get_media_val_str(num_logical_ports, lane_dict): # in breakout mode. So fetch the corresponding lanes from the file media_val_str = '' if (num_logical_ports > 1) and \ - (num_lanes_on_port > num_logical_ports): + (num_lanes_on_port >= num_logical_ports): num_lanes_per_logical_port = num_lanes_on_port/num_logical_ports start_lane = logical_idx * num_lanes_per_logical_port @@ -620,7 +620,8 @@ def notify_media_setting(logical_port_name, transceiver_dict, for media_key in media_dict: if type(media_dict[media_key]) is dict: media_val_str = get_media_val_str(num_logical_ports, \ - media_dict[media_key]) + media_dict[media_key], + logical_idx) else: media_val_str = media_dict[media_key] fvs[index] = (str(media_key), str(media_val_str))