Skip to content

Commit

Permalink
[xcvrd] Fix transceiver tuning issue (sonic-net#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudharsan D.G authored and jleveque committed Aug 20, 2019
1 parent 88d6d5a commit ffa248c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sonic-xcvrd/scripts/xcvrd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ffa248c

Please sign in to comment.