From nobody Sun Feb 16 00:25:59 2025 X-Original-To: dev-commits-src-all@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 4YwRQv2mPHz5nb0p; Sun, 16 Feb 2025 00:25:59 +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 4YwRQv2696z3b8N; Sun, 16 Feb 2025 00:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739665559; 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=FDVxabVzw7b7TMNm7u+5yFx0vjlfOKbB6UkALCKyQKw=; b=Kb4PX5TuXcMIkjPU1TuAQ9dV9YWyo0eh9eI+NoZsJV1LFp/Upir0jGiLrEc/chgHiJ882I SqjurggLahN5eHNDWgWVKK4YdQVnBiSX+w51w8OD/dpP9diIy9mlm6HeSudHHe16+DZ7Ae 0phxwbjtTkITK8Yc21LuBY4XhkB03JakKREn+2tWYoC7aP8hqJtWYWQXCIvJMyBKRPl4fG 8gBZ9XKenU4pSVqMO8VTMZSKdEnALV76OilnZC14HwyituaCKVY+26qylnC76m+IzUnPJ5 r3wEtEWxgM7fqLHDrludaLGb8TeXF44hJw3nymSRgRUZf1Zn4D4mQWYHtQKEwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739665559; a=rsa-sha256; cv=none; b=NSAqvtV6tgfSQP71/8vhIZtxzVlzdmVIGk5K6Dd39chsHQNM2zkof23nBUmcmwtKFF+qdd waMEpQjplA7/LFJT3KI4sIV9oBqF77KNsTVRONpVFOQtuhsa17Vdrs8sJskwefUKcQzKsa 313Afa8/3nicJRCxg9tSIeItsZjMTE+RbNvCCV5UQRXVr4UwpBkl9PShJAp5/xdNIMQht9 0nAAhrWOitvY3N6NofMmZiBWA6PY7r+bAx+SsYdw73aOARblHD404TvmK0CGsdbxl2N+bZ RXn1VEMkGk3p6V26kRermdI6rRWAu6F/jTVAqKxoII/n3XQYqessRSDOlERikA== 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=1739665559; 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=FDVxabVzw7b7TMNm7u+5yFx0vjlfOKbB6UkALCKyQKw=; b=IokoCcevn9az86ifr74oUqiCqDYSvZ6Etz33VDwyAuUZl0I1n1meQu7wGwXLKWuX2ixUYQ VCZiCIGnL3ss9BUMm5xbgJseYzPvg8Q6fpPsYhFtCot+OMca5EMt9J39dneEgb5LXIYEWz Et6rcsjf8DxlPkbtqyFhTw3deQTVBV+HdFqxT83Ly7Rd3ZdbsS/WoWrU/OcB8OS+OmVNjX DRHH3tazF2nnuzjzxHV9cHToynb4q3PHWAjXTpJWV4HQbQsjDAsQRk83I4YJd1GBgqIZw/ RacgBQd0WvTN6dRVo+c0n1mX/UCydLwW1i7rjyCUIzV+5m/eBYTMJx1U7SeqwA== 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 4YwRQv1h0wz89b; Sun, 16 Feb 2025 00:25:59 +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 51G0PxdI016247; Sun, 16 Feb 2025 00:25:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51G0PxBd016244; Sun, 16 Feb 2025 00:25:59 GMT (envelope-from git) Date: Sun, 16 Feb 2025 00:25:59 GMT Message-Id: <202502160025.51G0PxBd016244@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: c34817d9aef7 - stable/14 - ixgbe: Add support for 1000BASE-BX SFP modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: c34817d9aef7e97578f5ccb0b24381f5b4b9013f Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c34817d9aef7e97578f5ccb0b24381f5b4b9013f commit c34817d9aef7e97578f5ccb0b24381f5b4b9013f Author: Tore Amundsen AuthorDate: 2024-11-06 21:31:01 +0000 Commit: Kevin Bowling CommitDate: 2025-02-16 00:25:04 +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 e94e120e27f9..959afa79e7da 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -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: 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 };