0

The S4112F-ON switch has 12 SFP+ ports; we are using several of them. My goal is to access the EEPROM on ALL the SFPs on the switch via their i2c interface with i2c-tools (linux) and ultimately open optical monitoring (OOM) or a derivation of that capability. The OOM tools are segfaulting when run after installation of the optoe driver (the driver installs successfully) -- this is why I am working in a more direct way.

Right now the i2c addresses 0x50 and 0x51 can be accessed, but they point to a specific SFP+ EEPROM. Address 0x70 (in use by the driver) is a multiplexer whose control register determines WHICH SFP is accessed via 0x50 and 0x51 (I think).

root@OPX:/home/admin# i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --                         

Any changes to the control register (via i2cset) are failing to take effect without an error message. I suppose this is interferrence from the driver OR because i2cset does NOT guarantee it will work...

root@OPX:/home/admin# i2cget -f -y 4 0x70 0x00
0x04
root@OPX:/home/admin# i2cset -f -y 4 0x70 0x00 0x05
root@OPX:/home/admin# i2cget -f -y 4 0x70 0x00
0x04

The i2c driver (part of the OPX install), presents access points via linux's sysfs "API" but I am unclear how this interface allows access to the EEPROMs.

I am looking for a solution to SWITCH the SFP that the i2c registers are accessing. Any insight would be super helpful. Thanks.

2
  • 1
    If another driver has claimed the mux, you can't mess with it. (doing so would be very unwise, as the driver won't know you've pointed it to something else.) Any sysfs interface(s) should be aware of this and have some way to cooperate with other drivers. – Ricky Mar 18 at 20:15
  • I attempted to remove the driver claiming address 0x70 prior to using the i2c-tool. I could not remove the driver, froze the shell, and gave a -1 usage count in lsmod output. Thanks for the response. – jmcarter9t Mar 18 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.