Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcvrd exception when change port speed for RJ45 ports #10

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

chiourung
Copy link

Root Cause:
exception log:

    ERR pmon#xcvrd:   File "/usr/local/lib/python3.9/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 244, in read_eeprom
    ERR pmon#xcvrd:     with open(self.get_eeprom_path(), mode='rb', buffering=0) as f:
    ERR pmon#xcvrd:   File "/usr/local/lib/python3.9/dist-packages/sonic_platform/sfp.py", line 80, in get_eeprom_path
    ERR pmon#xcvrd:     return self.port_to_eeprom_mapping[self.port_num]
    ERR pmon#xcvrd: KeyError: 1

There is no eeprom for RJ45.

Solution:
There is no need for a pre-emphasis setting if a transceiver is not inserted.
It always returns false from "get_presence" for RJ45.
Added a check to see if a transceiver is presented before applying the media setting.

Description

Motivation and Context

How Has This Been Tested?

Additional Information (Optional)

Root Cause:
  exception log:
    ERR pmon#xcvrd:   File "/usr/local/lib/python3.9/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 244, in read_eeprom
    ERR pmon#xcvrd:     with open(self.get_eeprom_path(), mode='rb', buffering=0) as f:
    ERR pmon#xcvrd:   File "/usr/local/lib/python3.9/dist-packages/sonic_platform/sfp.py", line 80, in get_eeprom_path
    ERR pmon#xcvrd:     return self.port_to_eeprom_mapping[self.port_num]
    ERR pmon#xcvrd: KeyError: 1

  There is no eeprom for RJ45.

Solution:
  There is no need for a pre-emphasis setting if a transceiver is not inserted.
  It always returns false from "get_presence" for RJ45.
  Added a check to see if a transceiver is presented before applying the media setting.
@CharlieChenEC CharlieChenEC merged commit e98ed9c into edge-core:202311.X Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants