mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ixgbe: Add support for 1000BASE-BX SFP modules
Add support for 1Gbit BiDi modules Signed-off-by: Tore Amundsen <tore@amundsen.org> Relnotes: yes Pull Request: https://github.com/freebsd/freebsd-src/pull/1518 (cherry picked from commit 89d4096950c4db748e39758c941cfb708c2ff808)
This commit is contained in:
parent
31af1ba0a8
commit
c34817d9ae
5 changed files with 30 additions and 6 deletions
|
|
@ -1424,8 +1424,10 @@ ixgbe_add_media_types(if_ctx_t ctx)
|
|||
ifmedia_add(sc->media, IFM_ETHER | IFM_2500_SX, 0, NULL);
|
||||
}
|
||||
#endif
|
||||
if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_BX)
|
||||
if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_BX) {
|
||||
device_printf(dev, "Media supported: 1000baseBX\n");
|
||||
ifmedia_add(sc->media, IFM_ETHER | IFM_1000_BX, 0, NULL);
|
||||
}
|
||||
|
||||
if (hw->device_id == IXGBE_DEV_ID_82598AT) {
|
||||
ifmedia_add(sc->media, IFM_ETHER | IFM_1000_T | IFM_FDX,
|
||||
|
|
@ -2567,6 +2569,7 @@ ixgbe_if_media_change(if_ctx_t ctx)
|
|||
#endif
|
||||
case IFM_1000_LX:
|
||||
case IFM_1000_SX:
|
||||
case IFM_1000_BX:
|
||||
speed |= IXGBE_LINK_SPEED_1GB_FULL;
|
||||
break;
|
||||
case IFM_1000_T:
|
||||
|
|
|
|||
|
|
@ -435,7 +435,9 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw,
|
|||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1) {
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1) {
|
||||
*speed = IXGBE_LINK_SPEED_1GB_FULL;
|
||||
*autoneg = true;
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -1423,6 +1423,13 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
|
|||
else
|
||||
hw->phy.sfp_type =
|
||||
ixgbe_sfp_type_1g_lx_core1;
|
||||
} else if (comp_codes_1g & IXGBE_SFF_BASEBX10_CAPABLE) {
|
||||
if (hw->bus.lan_id == 0)
|
||||
hw->phy.sfp_type =
|
||||
ixgbe_sfp_type_1g_bx_core0;
|
||||
else
|
||||
hw->phy.sfp_type =
|
||||
ixgbe_sfp_type_1g_bx_core1;
|
||||
} else {
|
||||
hw->phy.sfp_type = ixgbe_sfp_type_unknown;
|
||||
}
|
||||
|
|
@ -1513,7 +1520,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
|
|||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
|
||||
hw->phy.type = ixgbe_phy_sfp_unsupported;
|
||||
status = IXGBE_ERR_SFP_NOT_SUPPORTED;
|
||||
goto out;
|
||||
|
|
@ -1532,7 +1541,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
|
|||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
|
||||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
|
||||
/* Make sure we're a supported PHY type */
|
||||
if (hw->phy.type == ixgbe_phy_sfp_intel) {
|
||||
status = IXGBE_SUCCESS;
|
||||
|
|
@ -1615,6 +1626,8 @@ u64 ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw)
|
|||
physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T;
|
||||
else if (comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE)
|
||||
physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_SX;
|
||||
else if (comp_codes_1g & IXGBE_SFF_BASEBX10_CAPABLE)
|
||||
physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_BX;
|
||||
break;
|
||||
case ixgbe_phy_qsfp_intel:
|
||||
case ixgbe_phy_qsfp_unknown:
|
||||
|
|
@ -1863,12 +1876,14 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
|
|||
if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_sx_core0)
|
||||
sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_bx_core0)
|
||||
sfp_type = ixgbe_sfp_type_srlr_core0;
|
||||
else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_sx_core1)
|
||||
sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
|
||||
sfp_type == ixgbe_sfp_type_1g_bx_core1)
|
||||
sfp_type = ixgbe_sfp_type_srlr_core1;
|
||||
|
||||
/* Read offset to PHY init contents */
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
#define IXGBE_SFF_1GBE_COMP_CODES 0x6
|
||||
#define IXGBE_SFF_10GBE_COMP_CODES 0x3
|
||||
#define IXGBE_SFF_CABLE_TECHNOLOGY 0x8
|
||||
#define IXGBE_SFF_BITRATE_NOMINAL 0xC
|
||||
#define IXGBE_SFF_CABLE_SPEC_COMP 0x3C
|
||||
#define IXGBE_SFF_SFF_8472_SWAP 0x5C
|
||||
#define IXGBE_SFF_SFF_8472_COMP 0x5E
|
||||
|
|
@ -73,6 +74,7 @@
|
|||
#define IXGBE_SFF_1GBASET_CAPABLE 0x8
|
||||
#define IXGBE_SFF_10GBASESR_CAPABLE 0x10
|
||||
#define IXGBE_SFF_10GBASELR_CAPABLE 0x20
|
||||
#define IXGBE_SFF_BASEBX10_CAPABLE 0x40
|
||||
#define IXGBE_SFF_SOFT_RS_SELECT_MASK 0x8
|
||||
#define IXGBE_SFF_SOFT_RS_SELECT_10G 0x8
|
||||
#define IXGBE_SFF_SOFT_RS_SELECT_1G 0x0
|
||||
|
|
|
|||
|
|
@ -3807,6 +3807,8 @@ enum ixgbe_sfp_type {
|
|||
ixgbe_sfp_type_1g_sx_core1 = 12,
|
||||
ixgbe_sfp_type_1g_lx_core0 = 13,
|
||||
ixgbe_sfp_type_1g_lx_core1 = 14,
|
||||
ixgbe_sfp_type_1g_bx_core0 = 15,
|
||||
ixgbe_sfp_type_1g_bx_core1 = 16,
|
||||
ixgbe_sfp_type_not_present = 0xFFFE,
|
||||
ixgbe_sfp_type_unknown = 0xFFFF
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue