sonic-net / sonic-net/sonic-platform-common

sfp module dom eeprom related issues

Open
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
58
Forks
241
Avg merge
5d 12h
Merged PRs (30d)
8

Description

sonic-platform-common/sonic_sfp/sfputilbase.py

sfp module dom eeprom related issues(qsfp module works fine):
There are two situations in the DOM information location in the sfp module, we need a unified way to handle both cases.
Case A. i2c addr: 0x50 device node, offset 256-511
Case B. i2c addr: 0x51 device node, offset 0-255

  1. def get_eeprom_dom_raw(self, port_num). This function now actually gets i2c addr: 0x50, offset 0-255, which doesn't seem to work. (The following situation will only use 0x50)

     if port_num in self.port_to_eeprom_mapping.keys():
         sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[port_num]
    
  2. def get_transceiver_dom_info_dict(self, port_num). This function now actually gets i2c addr: 0x50, offset 256-511, which does not work properly in case B.

  3. line 1020,def get_transceiver_dom_info_dict(self, port_num): sfpd_obj = sff8472Dom() not working, calibration_type is not properly initialized.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in sonic-platform-common/sonic_sfp/sfputilbase.py by reading get_eeprom_dom_raw and get_transceiver_dom_info_dict, including the port_to_eeprom_mapping path. Compare how cases A and B locate DOM data, then inspect the sff8472Dom initialization around line 1020. Done means both address/offset layouts are handled consistently and calibration_type is initialized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.