On Thu, Jan 14, 2021 at 05:43:27AM +0100, Marek Behún wrote: > Add SFP_PASSWORD = 0x7b to the diagnostics enumerator. This address is > described in SFF-8436 and SFF-8636.
However, as I mentioned previously, these are not relevant for SFPs, but are for QSFPs, and QSFPs have a totally different layout. The data structure for this enum is described by SFF-8472, and it lists Vendor Specific Locations [Address A2h, Bytes 120-126] This is what the SFP_VSL definition covers. SFF-8436 defines the layout for "QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER": Table 17 - Lower Memory Map (A0h) Address Description Type Passive Copper, Optical Active Copper, Module Active Optical 0 Identifier (1 Read-Only R R Byte) 1-2 Status (2 Bytes) Read-Only See Table 18 3-21 Interrupt Flags Read-Only See Tables 19-21 (19 Bytes) ... 123-126 Password Entry Read/Write O O Area (optional) 4 Bytes 127 Page Select Byte Read/Write R R So, SFF-8436 is not relevant - not only is it for a different address but the whole format is different. SFF-8636 is "Specification for Management Interface for Cabled Environments" and defines: 2-Wire Serial Address 1010000x Lower Page 00h 0 Identifier 1- 2 Status 3- 21 Interrupt Flags ... 123-126 Password Entry Area (Optional) 127 Page Select Byte So again, SFF-8636 is not relevant for the same reasons as SFF-8436. We're left with SFF-8472, which mentions no password entry area, but leaves the area from 120-127 open as "vendor specific", so I don't think it is appropriate to start adding vendor specific definitions as if they were generic to sfp.h I would instead suggest defining this inside mdio-i2c.c as #define ROLLERBALL_PASSWORD (SFP_VSL + 3) rather than trying to make this appear generic. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!