net: Update SFF-8024 definitions and strings with values from rev 4.6

This will let ifconfig -v's SFF eeprom read functionality recognize more
module types.

Signed-off-by: Eric Joyner <erj@freebsd.org>

Reviewed by:	gallatin@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D21041
This commit is contained in:
Eric Joyner 2019-08-17 00:10:56 +00:00
parent 566144142e
commit f4aa9b67eb
2 changed files with 109 additions and 37 deletions

View File

@ -69,7 +69,7 @@ struct _nv {
const char *find_value(struct _nv *x, int value);
const char *find_zero_bit(struct _nv *x, int value, int sz);
/* SFF-8024 Rev. 4.1 Table 4-3: Connector Types */
/* SFF-8024 Rev. 4.6 Table 4-3: Connector Types */
static struct _nv conn[] = {
{ 0x00, "Unknown" },
{ 0x01, "SC" },
@ -77,18 +77,23 @@ static struct _nv conn[] = {
{ 0x03, "Fibre Channel Style 2 copper" },
{ 0x04, "BNC/TNC" },
{ 0x05, "Fibre Channel coaxial" },
{ 0x06, "FiberJack" },
{ 0x06, "Fiber Jack" },
{ 0x07, "LC" },
{ 0x08, "MT-RJ" },
{ 0x09, "MU" },
{ 0x0A, "SG" },
{ 0x0B, "Optical pigtail" },
{ 0x0C, "MPO Parallel Optic" },
{ 0x0C, "MPO 1x12 Parallel Optic" },
{ 0x0D, "MPO 2x16 Parallel Optic" },
{ 0x20, "HSSDC II" },
{ 0x21, "Copper pigtail" },
{ 0x22, "RJ45" },
{ 0x23, "No separable connector" },
{ 0x24, "MXC 2x16" },
{ 0x25, "CS optical connector" },
{ 0x26, "Mini CS optical connector" },
{ 0x27, "MPO 2x12 Parallel Optic" },
{ 0x28, "MPO 1x16 Parallel Optic" },
{ 0, NULL }
};
@ -184,9 +189,61 @@ static struct _nv eth_1040g[] = {
};
#define SFF_8636_EXT_COMPLIANCE 0x80
/* SFF-8024 Rev. 4.2 table 4-4: Extended Specification Compliance */
/* SFF-8024 Rev. 4.6 table 4-4: Extended Specification Compliance */
static struct _nv eth_extended_comp[] = {
{ 0xFF, "Reserved" },
{ 0x55, "128GFC LW" },
{ 0x54, "128GFC SW" },
{ 0x53, "128GFC EA" },
{ 0x52, "64GFC LW" },
{ 0x51, "64GFC SW" },
{ 0x50, "64GFC EA" },
{ 0x4F, "Reserved" },
{ 0x4E, "Reserved" },
{ 0x4D, "Reserved" },
{ 0x4C, "Reserved" },
{ 0x4B, "Reserved" },
{ 0x4A, "Reserved" },
{ 0x49, "Reserved" },
{ 0x48, "Reserved" },
{ 0x47, "Reserved" },
{ 0x46, "200GBASE-LR4" },
{ 0x45, "50GBASE-LR" },
{ 0x44, "200G 1550nm PSM4" },
{ 0x43, "200GBASE-FR4" },
{ 0x42, "50GBASE-FR or 200GBASE-DR4" },
{ 0x41, "50GBASE-SR/100GBASE-SR2/200GBASE-SR4" },
{ 0x40, "50GBASE-CR/100GBASE-CR2/200GBASE-CR4" },
{ 0x3F, "Reserved" },
{ 0x3E, "Reserved" },
{ 0x3D, "Reserved" },
{ 0x3C, "Reserved" },
{ 0x3B, "Reserved" },
{ 0x3A, "Reserved" },
{ 0x39, "Reserved" },
{ 0x38, "Reserved" },
{ 0x37, "Reserved" },
{ 0x36, "Reserved" },
{ 0x35, "Reserved" },
{ 0x34, "Reserved" },
{ 0x33, "50GAUI/100GAUI-2/200GAUI-4 AOC (BER <2.6e-4)" },
{ 0x32, "50GAUI/100GAUI-2/200GAUI-4 ACC (BER <2.6e-4)" },
{ 0x31, "50GAUI/100GAUI-2/200GAUI-4 AOC (BER <1e-6)" },
{ 0x30, "50GAUI/100GAUI-2/200GAUI-4 ACC (BER <1e-6)" },
{ 0x2F, "Reserved" },
{ 0x2E, "Reserved" },
{ 0x2D, "Reserved" },
{ 0x2C, "Reserved" },
{ 0x2B, "Reserved" },
{ 0x2A, "Reserved" },
{ 0x29, "Reserved" },
{ 0x28, "Reserved" },
{ 0x27, "100G-LR" },
{ 0x26, "100G-FR" },
{ 0x25, "100GBASE-DR" },
{ 0x24, "4WDM-40 MSA" },
{ 0x23, "4WDM-20 MSA" },
{ 0x22, "4WDM-10 MSA" },
{ 0x21, "100G PAM4 BiDi" },
{ 0x20, "100G SWDM4" },
{ 0x1F, "40G SWDM4" },
@ -207,8 +264,8 @@ static struct _nv eth_extended_comp[] = {
{ 0x10, "40GBASE-ER4" },
{ 0x0F, "Reserved" },
{ 0x0E, "Reserved" },
{ 0x0D, "25GBASE-CR CA-N" },
{ 0x0C, "25GBASE-CR CA-S" },
{ 0x0D, "25GBASE-CR CA-25G-N" },
{ 0x0C, "25GBASE-CR CA-25G-S" },
{ 0x0B, "100GBASE-CR4 or 25GBASE-CR CA-L" },
{ 0x0A, "Reserved" },
{ 0x09, "Obsolete" },

View File

@ -379,7 +379,7 @@ enum {
/*
* Table 3.2 Identifier values.
* Identifier constants has taken from SFF-8024 rev 4.2 table 4.1
* Identifier constants has taken from SFF-8024 rev 4.6 table 4.1
* (as referenced by table 3.2 footer)
* */
enum {
@ -396,10 +396,10 @@ enum {
SFF_8024_ID_X2 = 0xA, /* X2 */
SFF_8024_ID_DWDM_SFP = 0xB, /* DWDM-SFP */
SFF_8024_ID_QSFP = 0xC, /* QSFP */
SFF_8024_ID_QSFPPLUS = 0xD, /* QSFP+ */
SFF_8024_ID_QSFPPLUS = 0xD, /* QSFP+ or later */
SFF_8024_ID_CXP = 0xE, /* CXP */
SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */
SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */
SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */
SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */
SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 or later */
SFF_8024_ID_CXP2 = 0x12, /* CXP2 (aka CXP28) */
SFF_8024_ID_CDFP = 0x13, /* CDFP (Style 1/Style 2) */
@ -408,34 +408,49 @@ enum {
SFF_8024_ID_CDFP3 = 0x16, /* CDFP (Style3) */
SFF_8024_ID_MICROQSFP = 0x17, /* microQSFP */
SFF_8024_ID_QSFP_DD = 0x18, /* QSFP-DD 8X Pluggable Transceiver */
SFF_8024_ID_LAST = SFF_8024_ID_QSFP_DD
};
SFF_8024_ID_OSFP8X = 0x19, /* OSFP 8X Pluggable Transceiver */
SFF_8024_ID_SFP_DD = 0x1A, /* SFP-DD 2X Pluggable Transceiver */
SFF_8024_ID_DSFP = 0x1B, /* DSFP Dual SFF Pluggable Transceiver */
SFF_8024_ID_X4ML = 0x1C, /* x4 MiniLink/OcuLink */
SFF_8024_ID_X8ML = 0x1D, /* x8 MiniLink */
SFF_8024_ID_QSFP_CMIS = 0x1E, /* QSFP+ or later w/ Common Management
Interface Specification */
SFF_8024_ID_LAST = SFF_8024_ID_QSFP_CMIS
};
static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {"Unknown",
"GBIC",
"SFF",
"SFP/SFP+/SFP28",
"XBI",
"Xenpak",
"XFP",
"XFF",
"XFP-E",
"XPAK",
"X2",
"DWDM-SFP/SFP+",
"QSFP",
"QSFP+",
"CXP",
"HD4X",
"HD8X",
"QSFP28",
"CXP2",
"CDFP",
"SMM4",
"SMM8",
"CDFP3",
"microQSFP",
"QSFP-DD"};
static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {
"Unknown",
"GBIC",
"SFF",
"SFP/SFP+/SFP28",
"XBI",
"Xenpak",
"XFP",
"XFF",
"XFP-E",
"XPAK",
"X2",
"DWDM-SFP/SFP+",
"QSFP",
"QSFP+",
"CXP",
"HD4X",
"HD8X",
"QSFP28",
"CXP2",
"CDFP",
"SMM4",
"SMM8",
"CDFP3",
"microQSFP",
"QSFP-DD",
"QSFP8X",
"SFP-DD",
"DSFP",
"x4MiniLink/OcuLink",
"x8MiniLink",
"QSFP+(CIMS)"
};
/* Keep compatibility with old definitions */
#define SFF_8472_ID_UNKNOWN SFF_8024_ID_UNKNOWN