From nobody Sun Feb 09 00:06:56 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 4Yr7L90yn5z5nQsC; Sun, 09 Feb 2025 00:06:57 +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 4Yr7L86M6Dz3KC2; Sun, 09 Feb 2025 00:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739059616; 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=2E1XQp8h4VsXreHoYk0FSVVWFa/ZtorBMUWMsE2Ub9I=; b=FfkI67gd6a3f2IYTUfbly3zRKjt4C2MjrVQ194aiWpCYoFPtjtGs0jRR0ls2c6/mQVsTkO 4lD6NR4RtQ87OAM6Yw1kI/qgO6LSWCJKV0DUCxzTZx9GmKKsFZfSudIYTNO2Ehmrp5I76n v22M/LjgCIJ5xNtIaTXlr3GKXz0YBXQCLsP8aZAj+Y3dG1MSwxgEggPiejVziUpUWpZ9nT QtHCx4Pq9FHMA5P2FWYVKSgwfbQO+4a3lrs/IaJVoF5gAucgafVK23wgUBhLXT0JcNjaYE geoBW3EmpcwQui1DTR975yIMBh9keIq3S507jkPzCBXVrhO1RAN33sm8Cib2rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739059616; 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=2E1XQp8h4VsXreHoYk0FSVVWFa/ZtorBMUWMsE2Ub9I=; b=snIqqJkgUCfS3CdGUiY3iw1CwxwF79cwdw3rqcjcK7TZyDo6NXnzgDnP8/6AZPmfL1HL97 3EyZ4FlppWMxd4PNOi0pkpLgnr4sAN7k38qtJivWYSqG94KyLZAWVprykeSaY8onAaWqWn VBlIZ2dNx4yTTHlUv91UZjxJOkiAFV+L2yES4I0iHuA3xcS73JRiAPtEFRgH75a58IV4Gx lybwuO5TchdPASYJWqBV7BnOd+HHY+rtwxMxdEU4B/Z/BhkGK7U61K2iXNEQaGKgjq8K7D B9/V84gCEyx04QDnXo7Xq4QALYi9twAayTUllhHgoCZ9oExlLanUXAd3QsVGdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739059616; a=rsa-sha256; cv=none; b=LhBIuO6Qn+WXA/S8cBGr94DIHAy2t3rA8pBoyks1F2fnXwT9lMzGpcRkaSWt03twBIWVpH 2LEKZYDEZ3+lUv3YwIx4Sln2PHMumkShOR+LYLCndgt4tj9gvfBRvBoNfDmTfWOrCCXRad ETiMTrmUxi5UTryIKIiAde8reb3Fn510zUNf3Au2R+6qfQ7e4rMEJ8FV/oKrj1s4pBbbKW 1uSPNBw/q9wlYyEUVagWKpX5zb89oqBbCVdRSIawrEwXqrvy7kbCHTWL3gjhK8w9aihLfP Ld/FS1vKN4Tb0avkIVxlAU5Fz76W6RM2nlOmlQbC20Hg91PUtAIQ4CzDNnq0og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Yr7L85jgrzYwk; Sun, 09 Feb 2025 00:06:56 +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 51906uku061484; Sun, 9 Feb 2025 00:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51906uGG061481; Sun, 9 Feb 2025 00:06:56 GMT (envelope-from git) Date: Sun, 9 Feb 2025 00:06:56 GMT Message-Id: <202502090006.51906uGG061481@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 89d4096950c4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 89d4096950c4db748e39758c941cfb708c2ff808 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=89d4096950c4db748e39758c941cfb708c2ff808 commit 89d4096950c4db748e39758c941cfb708c2ff808 Author: Tore Amundsen AuthorDate: 2024-11-06 21:31:01 +0000 Commit: Kevin Bowling CommitDate: 2025-02-09 00:06:33 +0000 ixgbe: Add support for 1000BASE-BX SFP modules Add support for 1Gbit BiDi modules Signed-off-by: Tore Amundsen MFC after: 1 week Relnotes: yes Pull Request: https://github.com/freebsd/freebsd-src/pull/1518 --- 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 };