From nobody Sun Feb 16 00:27:01 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YwRS54V6Lz5nb3J; Sun, 16 Feb 2025 00:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YwRS53H93z3cSq; Sun, 16 Feb 2025 00:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739665621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BqgkJRufyvG1Y10W3mTWiu3Sc+y2g2UsfyBxoEjew4w=; b=Gss0heidl3cpbxrEVf2I5SLxgaWuz1tjB8AkpGrERAesi0XzlsKikIdrvJ65gnqVXtbA/a NgDa0Zx0JN2la3Fwoy+ItSwCJVtoYjlvWNllafki9CHLkgvEHHUce40yT4zR75xKVo+OOy XL1ffatY4JryaaUD5wJztfIJ5cWuFA7IkVhWLwSctkrRx9m2LuyB9F4Wu1CCoLaSsH8hBy JYb5WiQ/2FexCHo7tGju8O5Gd96VGuSZ7+uDlA0OxmhO2TBgSS4kmmKLXyPMdXipoMn0Sl r8+aNf3EQJV6jqp+AcSjgdUHTgqZkaiDZpSL36XPLVR04hWj49q4CbsPRPotlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739665621; a=rsa-sha256; cv=none; b=ZM3nZ1t2D6iA+0Q44sCeEea/8RkZHNU1tuYkp8VU8zkhlyrAD1gmzvRhGeqmuae/0qNk90 gwoy6fAYJTHAUIY2EYptsX6Y683o9e1ddeZxdSxOOfj5zR7nrIV7rWmVOBIwNis+zoqIwK ZhOZz724ktRkJXxo4EUxmfxgk5hTQSJASC+SQc/p944gu1rDChq33/6w57OhYfpDsoIblY NRzedgt3ym1BwT7HCVofN+r4Elm6WucOGFmT/KqCsd8U5pe2oZ3tJh5PPq+MPm3+uT0CLl IB/41z3Vv9Y2loW29Qf7DHKM43ZvuLGGMrQ9NsmFEfVJNQEg2fnPCiETFq5gWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739665621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BqgkJRufyvG1Y10W3mTWiu3Sc+y2g2UsfyBxoEjew4w=; b=rfGTHA0bb8Cm2Tt8xu7D8ez5VzxXq/E/VQAMYL4FwKPMb4J8jlgonVZDzYHOzgrctDPmmA LG2ILM1GaPOwBsNWUcH/f6NRiMNceFwKgQ8NmxrKejjEyN8xP1sGHEsSrgNSsnPHbaUHxq h/w8ksg3eLTrtun/rcuTxRVILSEHo7aLf/geOTnmF2ycVaNQgypGECKHp1Le+aUNrTcvYd RkXPDrI0Yl4iMH87uo6YGO0EDHyekT4bsKgmjXVYMJ1hWR/JEG/7akS1W7TeyVsAk+qSv8 jF8e4LaQ+vc8AYQlXhtP8tuKnTTneDnpRDmVtyyXvKHR2fP4kivy/1KrJH7QtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YwRS52mfqz7wX; Sun, 16 Feb 2025 00:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51G0R1xo016761; Sun, 16 Feb 2025 00:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51G0R1UM016756; Sun, 16 Feb 2025 00:27:01 GMT (envelope-from git) Date: Sun, 16 Feb 2025 00:27:01 GMT Message-Id: <202502160027.51G0R1UM016756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b26592d87dbe - stable/13 - ixgbe: Add support for 1000BASE-BX SFP modules List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b26592d87dbedb202b4b75f8515165deb7e234d0 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b26592d87dbedb202b4b75f8515165deb7e234d0 commit b26592d87dbedb202b4b75f8515165deb7e234d0 Author: Tore Amundsen AuthorDate: 2024-11-06 21:31:01 +0000 Commit: Kevin Bowling CommitDate: 2025-02-16 00:26:26 +0000 ixgbe: Add support for 1000BASE-BX SFP modules Add support for 1Gbit BiDi modules Signed-off-by: Tore Amundsen Relnotes: yes Pull Request: https://github.com/freebsd/freebsd-src/pull/1518 (cherry picked from commit 89d4096950c4db748e39758c941cfb708c2ff808) --- sys/dev/ixgbe/if_ix.c | 5 ++++- sys/dev/ixgbe/ixgbe_82599.c | 4 +++- sys/dev/ixgbe/ixgbe_phy.c | 23 +++++++++++++++++++---- sys/dev/ixgbe/ixgbe_phy.h | 2 ++ sys/dev/ixgbe/ixgbe_type.h | 2 ++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 313f95c82713..641689d3e065 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1425,8 +1425,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, @@ -2568,6 +2570,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: diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index b2b40371648b..50902c6c356d 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -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; diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index ea815c6c88e5..2a735ead9a12 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -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 */ diff --git a/sys/dev/ixgbe/ixgbe_phy.h b/sys/dev/ixgbe/ixgbe_phy.h index 1fa2acb77354..c1ba73851397 100644 --- a/sys/dev/ixgbe/ixgbe_phy.h +++ b/sys/dev/ixgbe/ixgbe_phy.h @@ -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 diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index a414e27142ec..91b46da72c75 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -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 };