Skip to content
5 changes: 4 additions & 1 deletion sonic-xcvrd/xcvrd/xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,10 @@ def on_port_update_event(self, port_change_event):
self.port_dict[lport]['lanes'] = port_change_event.port_dict['lanes']
if 'host_tx_ready' in port_change_event.port_dict:
self.port_dict[lport]['host_tx_ready'] = port_change_event.port_dict['host_tx_ready']
if 'admin_status' in port_change_event.port_dict:
if 'admin_status' in port_change_event.port_dict and 'oper_status' in port_change_event.dict:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in port_change_event.dict: -> in port_change_event.port_dict:

# At times 'admin_status' is NOT the same in the PORT_TABLE of APPL_DB and STATE_DB
# We dont have better way to check if 'admin_status' is from APPL_DB or STATE_DB so this
# check is put temporarily to list only to APPL_DB's admin_status and ignore that of STATE_DB
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of 'list only' it should be 'listen only'

self.port_dict[lport]['admin_status'] = port_change_event.port_dict['admin_status']
self.force_cmis_reinit(lport, 0)
else:
Expand Down