oxidecomputer / transceiver-control

Crate for controlling optical transceivers over the network
Mozilla Public License 2.0
7 stars 0 forks source link

Need SFF-8024 Extended Specification Compliance Code in the `VendorInfo` decoding #70

Open bnaecker opened 1 year ago

bnaecker commented 1 year ago

We're currently parsing out vendor name, part number, serial number, and some other data when decoding vendor information. We need to add the SFF-8024 Table 4-4 Extended Specification Compliance Code to that. In SFF-8636 modules, that's page 0 byte 192 (rev 2.10a section 6.2.23). I actually can't find this in the CMIS 5.0 spec right now. I assume it's there, I'll add when I find it.

bnaecker commented 1 year ago

Couple of things. First, we really the not just the extended code for SFF-8636 modules, but the compliance code. Rev 2.10a section 6.3.4, table 6-16. This is a bit mask in page 0, bytes 131-138. One of those bits indicates whether the Extended Compliance Specification Code actually describes the module.

Second, as usual CMIS has done this better. It's also much more complicated. The MediaType field (lower memory, byte 85) describes which table from SFF-8024 the MediaInterfaceId field comes from. There are actually several of those MediaInterfaceIds, as an array of ApplicationDescriptors. Those start at lower memory, byte 86, with fields of HostInterfaceId, MediaInterfaceId, HostLaneCount, and MediaLaneCount.

I really don't want to decode all of these, but at a minimum, we need to: