rozmanro
rozmanro

Reputation: 21

I2c eeprom file missing in user-space - SFP module

I have some linux kernel & SFP/I2C driver issue.

I am using a buildroot linux kernel for an embedded board.

I need to be able to read the eeprom file of the SFP i2c device.

1. working case:

When SFP module is inserted in my development unit board from the start (before the kernel loads up) then when startup completed i can see and read the eeprom file in the path: /sys/class/i2c-adapter/i2c-1/1-0050/eeprom

eeprom file exists

enter image description here

2. not working case:

If there is no SFP module inserted on startup,and kernel completes the boot procces, then when i'm inserting the SFP module in,i observe that the path:

/sys/class/i2c-adapter/i2c-1/1-0050/ DOESN'T include the eeprom file.

eeprom file missing

enter image description here

My guess is the SFP driver is responsible for that trigger that should happen once the SFP module is inserted, and should trigger the creation of eeprom file.

Would like to ask you what am i missing ? some binding code from sfp driver to trigger the i2c scan or something?

Any suggestion?

Thanks in advance.

Upvotes: 0

Views: 2409

Answers (1)

rozmanro
rozmanro

Reputation: 21

A possible workaround for this issue was found.

to use the ethtool -m interface.

from ethtool man page:

-m --dump-module-eeprom Retrieves and if possible decodes the EEPROM from plugin modules, e.g SFP+, QSFP

Upvotes: 0

Related Questions