diff --git a/modules/sff/module/auto/sff.yml b/modules/sff/module/auto/sff.yml index 2b29ca81..002e77db 100644 --- a/modules/sff/module/auto/sff.yml +++ b/modules/sff/module/auto/sff.yml @@ -86,6 +86,12 @@ sff_module_types: &sff_module_types desc: "100G-AOC-LBER" - 100G_ACC_LBER: desc: "100G-ACC-LBER" +- 100G_BASE_DR: + desc: "100GBASE-DR" +- 100G_BASE_FR: + desc: "100GBASE-FR" +- 100G_BASE_LR: + desc: "100GBASE-LR" - 40G_BASE_CR4: desc: "40GBASE-CR4" - 40G_BASE_SR4: @@ -138,6 +144,10 @@ sff_module_types: &sff_module_types desc: "1GBASE-SX" - 1G_BASE_LX: desc: "1GBASE-LX" +- 1G_BASE_BX10: + desc: "1GBASE-BX-10" +- 1G_BASE_BX40: + desc: "1GBASE-BX-40" - 1G_BASE_ZX: desc: "1GBASE-ZX" - 1G_BASE_CX: diff --git a/modules/sff/module/inc/sff/8472.h b/modules/sff/module/inc/sff/8472.h index 569dddd7..ffc508dd 100644 --- a/modules/sff/module/inc/sff/8472.h +++ b/modules/sff/module/inc/sff/8472.h @@ -109,6 +109,7 @@ #define SFF8472_CC6_CBE_BASE_LX 0x10 #define SFF8472_CC6_CBE_BASE_FX 0x20 #define SFF8472_CC6_BASE_BX10 0x40 +#define SFF8472_CC6_BASE_BX40 0x40 #define SFF8472_CC6_BASE_PX 0x80 #define SFF8472_CC7_FC_TECH_EL 0x01 @@ -566,6 +567,10 @@ _sff8472_hack_cr(const uint8_t* idprom) #define SFF8472_MEDIA_CBE_LX(idprom) \ ((idprom[6] & SFF8472_CC6_CBE_BASE_LX) != 0) +#define SSFF8472_MEDIA_CC6_BX10(idprom) \ + ((idprom[6] & SFF8472_CC6_BASE_BX10) != 0) +#define SSFF8472_MEDIA_CC6_BX40(idprom) \ + ((idprom[6] & SFF8472_CC6_BASE_BX40) != 0) #define SFF8472_MEDIA_CBE_FX(idprom) \ ((idprom[6] & SFF8472_CC6_CBE_BASE_FX) != 0) @@ -918,6 +923,8 @@ _sff8472_sfp_10g_aoc(const uint8_t *idprom) if (SFF8472_MEDIA_GBE_CX(idprom)) return 0; if (SFF8472_MEDIA_GBE_T(idprom)) return 0; if (SFF8472_MEDIA_CBE_LX(idprom)) return 0; + if (SSFF8472_MEDIA_CC6_BX10(idprom)) return 0; + if (SSFF8472_MEDIA_CC6_BX40(idprom)) return 0; if (SFF8472_MEDIA_CBE_FX(idprom)) return 0; /* should be active */ diff --git a/modules/sff/module/inc/sff/8636.h b/modules/sff/module/inc/sff/8636.h index 5e25e332..a497560e 100644 --- a/modules/sff/module/inc/sff/8636.h +++ b/modules/sff/module/inc/sff/8636.h @@ -149,6 +149,9 @@ #define SFF8636_CC192_40GE_SWDM4 0x1F #define SFF8636_CC192_100GE_SWDM4 0x20 #define SFF8636_CC192_100GE_PAM4_BIDI 0x21 +#define SFF8636_CC192_100GE_DR 0x25 +#define SFF8636_CC192_100GE_FR 0x26 +#define SFF8636_CC192_100GE_LR 0x27 #define SFF8636_MEDIA_100GE_AOC(idprom) \ ((idprom[192] == SFF8636_CC192_100GE_AOC) || \ @@ -176,6 +179,12 @@ (idprom[192] == SFF8636_CC192_100GE_AOC_LBER) #define SFF8636_MEDIA_100GE_ACC_LBER(idprom) \ (idprom[192] == SFF8636_CC192_100GE_ACC_LBER) +#define SFF8636_MEDIA_100GE_DR(idprom) \ + (idprom[192] == SFF8636_CC192_100GE_DR) +#define SFF8636_MEDIA_100GE_FR(idprom) \ + (idprom[192] == SFF8636_CC192_100GE_FR) +#define SFF8636_MEDIA_100GE_LR(idprom) \ + (idprom[192] == SFF8636_CC192_100GE_LR) #define SFF8636_MEDIA_40GE_ER4(idprom) \ (idprom[192] == SFF8636_CC192_40GE_ER4) #define SFF8636_MEDIA_40GE_SWDM4(idprom) \ diff --git a/modules/sff/module/inc/sff/sff.h b/modules/sff/module/inc/sff/sff.h index 1248c3a1..39b9cb58 100644 --- a/modules/sff/module/inc/sff/sff.h +++ b/modules/sff/module/inc/sff/sff.h @@ -119,6 +119,9 @@ typedef enum sff_module_type_e { SFF_MODULE_TYPE_100G_PAM4_BIDI, SFF_MODULE_TYPE_100G_AOC_LBER, SFF_MODULE_TYPE_100G_ACC_LBER, + SFF_MODULE_TYPE_100G_BASE_DR, + SFF_MODULE_TYPE_100G_BASE_FR, + SFF_MODULE_TYPE_100G_BASE_LR, SFF_MODULE_TYPE_40G_BASE_CR4, SFF_MODULE_TYPE_40G_BASE_SR4, SFF_MODULE_TYPE_40G_BASE_LR4, @@ -150,6 +153,8 @@ typedef enum sff_module_type_e { SFF_MODULE_TYPE_1G_BASE_T, SFF_MODULE_TYPE_100_BASE_LX, SFF_MODULE_TYPE_100_BASE_FX, + SFF_MODULE_TYPE_1G_BASE_BX10, + SFF_MODULE_TYPE_1G_BASE_BX40, SFF_MODULE_TYPE_4X_MUX, SFF_MODULE_TYPE_LAST = SFF_MODULE_TYPE_4X_MUX, SFF_MODULE_TYPE_COUNT, @@ -180,6 +185,9 @@ typedef enum sff_module_type_e { "100G_PAM4_BIDI", \ "100G_AOC_LBER", \ "100G_ACC_LBER", \ + "100G_BASE_DR", \ + "100G_BASE_FR", \ + "100G_BASE_LR", \ "40G_BASE_CR4", \ "40G_BASE_SR4", \ "40G_BASE_LR4", \ @@ -206,6 +214,8 @@ typedef enum sff_module_type_e { "10G_BASE_T", \ "1G_BASE_SX", \ "1G_BASE_LX", \ + "1G_BASE_BX10",\ + "1G_BASE_BX40",\ "1G_BASE_ZX", \ "1G_BASE_CX", \ "1G_BASE_T", \ diff --git a/modules/sff/module/inc/sff/sff.x b/modules/sff/module/inc/sff/sff.x index 455b5abb..049a47c3 100644 --- a/modules/sff/module/inc/sff/sff.x +++ b/modules/sff/module/inc/sff/sff.x @@ -28,6 +28,9 @@ SFF_MEDIA_TYPE_ENTRY(100G_SWDM4, 100G-SWDM4) SFF_MEDIA_TYPE_ENTRY(100G_PAM4_BIDI, 100G-PAM4-BIDI) SFF_MEDIA_TYPE_ENTRY(100G_AOC_LBER, 100G-AOC-LBER) SFF_MEDIA_TYPE_ENTRY(100G_ACC_LBER, 100G-ACC-LBER) +SFF_MEDIA_TYPE_ENTRY(100G_BASE_DR, 100GBASE-DR) +SFF_MEDIA_TYPE_ENTRY(100G_BASE_FR, 100GBASE-FR) +SFF_MEDIA_TYPE_ENTRY(100G_BASE_LR, 100GBASE-LR) SFF_MEDIA_TYPE_ENTRY(40G_BASE_CR4, 40GBASE-CR4) SFF_MEDIA_TYPE_ENTRY(40G_BASE_SR4, 40GBASE-SR4) SFF_MEDIA_TYPE_ENTRY(40G_BASE_LR4, 40GBASE-LR4) @@ -96,6 +99,9 @@ SFF_MODULE_TYPE_ENTRY(100G_SWDM4, 100G-SWDM4) SFF_MODULE_TYPE_ENTRY(100G_PAM4_BIDI, 100G-PAM4-BIDI) SFF_MODULE_TYPE_ENTRY(100G_AOC_LBER, 100G-AOC-LBER) SFF_MODULE_TYPE_ENTRY(100G_ACC_LBER, 100G-ACC-LBER) +SFF_MODULE_TYPE_ENTRY(100G_BASE_DR, 100GBASE-DR) +SFF_MODULE_TYPE_ENTRY(100G_BASE_FR, 100GBASE-FR) +SFF_MODULE_TYPE_ENTRY(100G_BASE_LR, 100GBASE-LR) SFF_MODULE_TYPE_ENTRY(40G_BASE_CR4, 40GBASE-CR4) SFF_MODULE_TYPE_ENTRY(40G_BASE_SR4, 40GBASE-SR4) SFF_MODULE_TYPE_ENTRY(40G_BASE_LR4, 40GBASE-LR4) diff --git a/modules/sff/module/src/sff.c b/modules/sff/module/src/sff.c index d6fe8fb6..6de55f63 100644 --- a/modules/sff/module/src/sff.c +++ b/modules/sff/module/src/sff.c @@ -81,6 +81,21 @@ sff_module_type_get(const uint8_t* eeprom) && SFF8636_MEDIA_100GE_LR4(eeprom)) return SFF_MODULE_TYPE_100G_BASE_LR4; + if (SFF8636_MODULE_QSFP28(eeprom) + && SFF8636_MEDIA_EXTENDED(eeprom) + && SFF8636_MEDIA_100GE_DR(eeprom)) + return SFF_MODULE_TYPE_100G_BASE_DR; + + if (SFF8636_MODULE_QSFP28(eeprom) + && SFF8636_MEDIA_EXTENDED(eeprom) + && SFF8636_MEDIA_100GE_FR(eeprom)) + return SFF_MODULE_TYPE_100G_BASE_FR; + + if (SFF8636_MODULE_QSFP28(eeprom) + && SFF8636_MEDIA_EXTENDED(eeprom) + && SFF8636_MEDIA_100GE_LR(eeprom)) + return SFF_MODULE_TYPE_100G_BASE_LR; + if (SFF8636_MODULE_QSFP28(eeprom) && SFF8636_MEDIA_EXTENDED(eeprom) && (SFF8636_MEDIA_100GE_CR4(eeprom) || @@ -285,6 +300,14 @@ sff_module_type_get(const uint8_t* eeprom) && SFF8472_MEDIA_CBE_FX(eeprom)) return SFF_MODULE_TYPE_100_BASE_FX; + if (SFF8472_MODULE_SFP(eeprom) + && SSFF8472_MEDIA_CC6_BX10(eeprom)) + return SFF_MODULE_TYPE_1G_BASE_BX10; + + if (SFF8472_MODULE_SFP(eeprom) + && SSFF8472_MEDIA_CC6_BX40(eeprom)) + return SFF_MODULE_TYPE_1G_BASE_BX40; + /* non-standard (e.g. Finisar) ZR media */ if (SFF8472_MODULE_SFP(eeprom) && _sff8472_media_zr(eeprom)) @@ -333,6 +356,9 @@ sff_media_type_get(sff_module_type_t mt) case SFF_MODULE_TYPE_100G_SWDM4: case SFF_MODULE_TYPE_100G_PAM4_BIDI: case SFF_MODULE_TYPE_100G_AOC_LBER: + case SFF_MODULE_TYPE_100G_BASE_DR: + case SFF_MODULE_TYPE_100G_BASE_FR: + case SFF_MODULE_TYPE_100G_BASE_LR: case SFF_MODULE_TYPE_40G_BASE_SR4: case SFF_MODULE_TYPE_40G_BASE_LR4: case SFF_MODULE_TYPE_40G_BASE_LM4: @@ -357,7 +383,9 @@ sff_media_type_get(sff_module_type_t mt) case SFF_MODULE_TYPE_1G_BASE_ZX: case SFF_MODULE_TYPE_100_BASE_LX: case SFF_MODULE_TYPE_100_BASE_FX: - case SFF_MODULE_TYPE_4X_MUX: + case SFF_MODULE_TYPE_1G_BASE_BX10: + case SFF_MODULE_TYPE_1G_BASE_BX40: + case SFF_MODULE_TYPE_4X_MUX: return SFF_MEDIA_TYPE_FIBER; case SFF_MODULE_TYPE_COUNT: @@ -389,6 +417,9 @@ sff_module_caps_get(sff_module_type_t mt, uint32_t *caps) case SFF_MODULE_TYPE_100G_PAM4_BIDI: case SFF_MODULE_TYPE_100G_AOC_LBER: case SFF_MODULE_TYPE_100G_ACC_LBER: + case SFF_MODULE_TYPE_100G_BASE_DR: + case SFF_MODULE_TYPE_100G_BASE_FR: + case SFF_MODULE_TYPE_100G_BASE_LR: *caps |= SFF_MODULE_CAPS_F_100G; return 0; @@ -428,7 +459,9 @@ sff_module_caps_get(sff_module_type_t mt, uint32_t *caps) case SFF_MODULE_TYPE_1G_BASE_LX: case SFF_MODULE_TYPE_1G_BASE_ZX: case SFF_MODULE_TYPE_1G_BASE_CX: - case SFF_MODULE_TYPE_1G_BASE_T: + case SFF_MODULE_TYPE_1G_BASE_BX10: + case SFF_MODULE_TYPE_1G_BASE_BX40: + case SFF_MODULE_TYPE_1G_BASE_T: *caps |= SFF_MODULE_CAPS_F_1G; return 0; @@ -847,6 +880,9 @@ sff_info_init(sff_info_t* info, sff_module_type_t mt, case SFF_MODULE_TYPE_100G_SWDM4: case SFF_MODULE_TYPE_100G_PAM4_BIDI: case SFF_MODULE_TYPE_100G_AOC_LBER: + case SFF_MODULE_TYPE_100G_BASE_DR: + case SFF_MODULE_TYPE_100G_BASE_FR: + case SFF_MODULE_TYPE_100G_BASE_LR: info->sfp_type = SFF_SFP_TYPE_QSFP28; info->media_type = SFF_MEDIA_TYPE_FIBER; info->caps = SFF_MODULE_CAPS_F_100G; @@ -916,6 +952,8 @@ sff_info_init(sff_info_t* info, sff_module_type_t mt, case SFF_MODULE_TYPE_1G_BASE_SX: case SFF_MODULE_TYPE_1G_BASE_LX: + case SFF_MODULE_TYPE_1G_BASE_BX10: + case SFF_MODULE_TYPE_1G_BASE_BX40: case SFF_MODULE_TYPE_1G_BASE_ZX: info->sfp_type = SFF_SFP_TYPE_SFP; info->media_type = SFF_MEDIA_TYPE_FIBER; diff --git a/modules/sff/module/src/sff_db.c b/modules/sff/module/src/sff_db.c index 9b27601e..a8da8edd 100644 --- a/modules/sff/module/src/sff_db.c +++ b/modules/sff/module/src/sff_db.c @@ -11,6 +11,11 @@ #define SFF_1G_BASE_SX_PROPERTIES \ SFF_SFP_TYPE_SFP, "SFP", SFF_MODULE_TYPE_1G_BASE_SX, "1GBASE-SX", SFF_MEDIA_TYPE_FIBER, "Fiber", SFF_MODULE_CAPS_F_1G +#define SFF_1G_BASE_BX10_PROPERTIES \ + SFF_SFP_TYPE_SFP, "SFP", SFF_MODULE_TYPE_1G_BASE_BX10, "1GBASE-BX-10", SFF_MEDIA_TYPE_FIBER, "Fiber", SFF_MODULE_CAPS_F_1G + +#define SFF_1G_BASE_BX40_PROPERTIES \ + SFF_SFP_TYPE_SFP, "SFP", SFF_MODULE_TYPE_1G_BASE_BX40, "1GBASE-BX-40", SFF_MEDIA_TYPE_FIBER, "Fiber", SFF_MODULE_CAPS_F_1G #define SFF_1G_BASE_LX_PROPERTIES \ SFF_SFP_TYPE_SFP, "SFP", SFF_MODULE_TYPE_1G_BASE_LX, "1GBASE-LR", SFF_MEDIA_TYPE_FIBER, "Fiber", SFF_MODULE_CAPS_F_1G diff --git a/modules/sff/module/src/sff_enums.c b/modules/sff/module/src/sff_enums.c index 407e351a..8e7c360b 100644 --- a/modules/sff/module/src/sff_enums.c +++ b/modules/sff/module/src/sff_enums.c @@ -816,6 +816,9 @@ aim_map_si_t sff_module_type_map[] = { "100G_PAM4_BIDI", SFF_MODULE_TYPE_100G_PAM4_BIDI }, { "100G_AOC_LBER", SFF_MODULE_TYPE_100G_AOC_LBER }, { "100G_ACC_LBER", SFF_MODULE_TYPE_100G_ACC_LBER }, + { "100G_BASE_DR", SFF_MODULE_TYPE_100G_BASE_DR }, + { "100G_BASE_FR", SFF_MODULE_TYPE_100G_BASE_FR }, + { "100G_BASE_LR", SFF_MODULE_TYPE_100G_BASE_LR }, { "40G_BASE_CR4", SFF_MODULE_TYPE_40G_BASE_CR4 }, { "40G_BASE_SR4", SFF_MODULE_TYPE_40G_BASE_SR4 }, { "40G_BASE_LR4", SFF_MODULE_TYPE_40G_BASE_LR4 }, @@ -842,6 +845,8 @@ aim_map_si_t sff_module_type_map[] = { "10G_BASE_T", SFF_MODULE_TYPE_10G_BASE_T }, { "1G_BASE_SX", SFF_MODULE_TYPE_1G_BASE_SX }, { "1G_BASE_LX", SFF_MODULE_TYPE_1G_BASE_LX }, + { "1G_BASE_BX10", SFF_MODULE_TYPE_1G_BASE_BX10 }, + { "1G_BASE_BX40", SFF_MODULE_TYPE_1G_BASE_BX40 }, { "1G_BASE_ZX", SFF_MODULE_TYPE_1G_BASE_ZX }, { "1G_BASE_CX", SFF_MODULE_TYPE_1G_BASE_CX }, { "1G_BASE_T", SFF_MODULE_TYPE_1G_BASE_T }, @@ -874,6 +879,9 @@ aim_map_si_t sff_module_type_desc_map[] = { "100G-PAM4-BIDI", SFF_MODULE_TYPE_100G_PAM4_BIDI }, { "100G-AOC-LBER", SFF_MODULE_TYPE_100G_AOC_LBER }, { "100G-ACC-LBER", SFF_MODULE_TYPE_100G_ACC_LBER }, + { "100GBASE-DR", SFF_MODULE_TYPE_100G_BASE_DR}, + { "100GBASE-FR", SFF_MODULE_TYPE_100G_BASE_FR}, + { "100GBASE-LR", SFF_MODULE_TYPE_100G_BASE_LR}, { "40GBASE-CR4", SFF_MODULE_TYPE_40G_BASE_CR4 }, { "40GBASE-SR4", SFF_MODULE_TYPE_40G_BASE_SR4 }, { "40GBASE-LR4", SFF_MODULE_TYPE_40G_BASE_LR4 }, @@ -900,6 +908,8 @@ aim_map_si_t sff_module_type_desc_map[] = { "10GBASE-T", SFF_MODULE_TYPE_10G_BASE_T }, { "1GBASE-SX", SFF_MODULE_TYPE_1G_BASE_SX }, { "1GBASE-LX", SFF_MODULE_TYPE_1G_BASE_LX }, + { "1GBASE-BX-10", SFF_MODULE_TYPE_1G_BASE_BX10 }, + { "1G_BASE_BX40", SFF_MODULE_TYPE_1G_BASE_BX40 }, { "1GBASE-ZX", SFF_MODULE_TYPE_1G_BASE_ZX }, { "1GBASE-CX", SFF_MODULE_TYPE_1G_BASE_CX }, { "1GBASE-T", SFF_MODULE_TYPE_1G_BASE_T },