Skip to content

Commit ffa248c

Browse files
Sudharsan D.Gjleveque
authored andcommitted
[xcvrd] Fix transceiver tuning issue (sonic-net#40)
1 parent 88d6d5a commit ffa248c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sonic-xcvrd/scripts/xcvrd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def get_media_val_str_from_dict(media_dict):
550550
media_str += lane_separator
551551
return media_str
552552

553-
def get_media_val_str(num_logical_ports, lane_dict):
553+
def get_media_val_str(num_logical_ports, lane_dict, logical_idx):
554554
lane_str = "lane"
555555
logical_media_dict = {}
556556
num_lanes_on_port = len(lane_dict)
@@ -559,7 +559,7 @@ def get_media_val_str(num_logical_ports, lane_dict):
559559
# in breakout mode. So fetch the corresponding lanes from the file
560560
media_val_str = ''
561561
if (num_logical_ports > 1) and \
562-
(num_lanes_on_port > num_logical_ports):
562+
(num_lanes_on_port >= num_logical_ports):
563563
num_lanes_per_logical_port = num_lanes_on_port/num_logical_ports
564564
start_lane = logical_idx * num_lanes_per_logical_port
565565

@@ -620,7 +620,8 @@ def notify_media_setting(logical_port_name, transceiver_dict,
620620
for media_key in media_dict:
621621
if type(media_dict[media_key]) is dict:
622622
media_val_str = get_media_val_str(num_logical_ports, \
623-
media_dict[media_key])
623+
media_dict[media_key],
624+
logical_idx)
624625
else:
625626
media_val_str = media_dict[media_key]
626627
fvs[index] = (str(media_key), str(media_val_str))

0 commit comments

Comments
 (0)