From nobody Thu Aug 20 16:39:45 2026 X-Original-To: dev-commits-src-main@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 4hQq0k3zkyz6p86W for ; Thu, 20 Aug 2026 16:39:50 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hQq0k3J15z3q9M for ; Thu, 20 Aug 2026 16:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787243990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A/inSxDYw5XQjBfAuijONc3byvrpyoXSNomqCMcuZm8=; b=JVIme5IF7SnSW/lrvkxTVgi6SlcgblUIH/hhR1HVqM18HmVnBu/F2DiLOvKuNgpatm0n9R Zq/pLOpFuniNOmJerWqq6J7XensHGQ8heGqEWnLou+I7oL25r472E4J90uPx49KmMeL6HI lb+fNI8txWo6Twa8Imow0DOH0GQLnzQ79CxjJZ6jxco71W3sOdCCLMu68KGxeCmNVnsUbn ugJbSsTjW0D0ZeCct98x1+l3kGJQeNvr27Bz/MulnxGs8aDfJw7dYqFduR5jTSf87WAmyZ dqM/T4RjTHdEtvUwmzxGHeYXGX2NVwTI0gPFdEFy5kQgs/dK8C+uMsD1hiwyIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787243990; a=rsa-sha256; cv=none; b=relSKbaI5ExETn2wropxZmrmIDQlp8P4eA8AZHisG87cInTebu0G0rXTdL1U90AEZ/SIe9 BVAvXixLS20SVaBBt1wK8hGaNxhxCoAfQwz97vuByZIpEykfDK9KF2cUkHdKBFxyg51UOJ FRV/PJYwdkvLPok6lc9FNKA+O6SRg+ttAfuB4W4uZ688+EaLmcsaKsVrjAd2ccOVEgahyB TYiHgCyHNhev81f0cZpNnpOCdPcAN3xKu39APnDTbtnsFnrRbIstzLt9TJS/Pi1eH/v35X K6/+4dEk75hDtW585u6m8MJ5/6D+0YQfleb3mKe2zCNqa69SVxamRJATJTtTXw== 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=1787243990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A/inSxDYw5XQjBfAuijONc3byvrpyoXSNomqCMcuZm8=; b=yzriYJxPpy6+hiVdRwz3k9fbd7i72PUIRrlyWhTzEhZyR3ogDtdjEDMQsQMdZuIAZmnD7E SQtw38BG72TUf89C54FkRns6QzfJhLXPHE2wxPuDMo+CIG+dosz0rp2ME5MDKhOK+FYh/3 Sce4if2jEkhprN5bDSoF3RJ6PcVxOwbIJVzytW4hd8TqWeiEm0glDml7t13qIm7JWvyqYv jdt7NNQhAaKD1rfo/blsTVgPmEsQ6JdFlblq9BFGgROrVXRLaG9h6XnQPmB2marhvefamG fyweig41t4+H05YcAS5rpl0WX7XGrnQiI21fRFdzRxVyVzKnUkF6RCoWAIo1HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hQq0k2KB3z9Bn for ; Thu, 20 Aug 2026 16:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f8c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 20 Aug 2026 16:39:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sobczyk, Pawel From: Krzysztof Galazka Subject: git: 0011cd9f8863 - main - ice(4): Support Total Port Shutdown on E830 devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0011cd9f8863fce3743bfd9920b7924162bb6410 Auto-Submitted: auto-generated Date: Thu, 20 Aug 2026 16:39:45 +0000 Message-Id: <6a872dd1.3f8c6.5233ec86@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=0011cd9f8863fce3743bfd9920b7924162bb6410 commit 0011cd9f8863fce3743bfd9920b7924162bb6410 Author: Sobczyk, Pawel AuthorDate: 2026-08-20 16:35:12 +0000 Commit: Krzysztof Galazka CommitDate: 2026-08-20 16:35:27 +0000 ice(4): Support Total Port Shutdown on E830 devices When 'Permit Total Port Shutdown' feature in BIOS is enabled then Port Disable bit is set in the Link Default Override Mask TLV PFA module in the NVM. In this mode, the driver acts as if the link_active_on_if_down flag is always disabled and disallow any change to that flag. This feature applies for E830 and E835 NIC series. Signed-off-by: Pawel Sobczyk Tested by: Mateusz Moga MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D58149 --- sys/dev/ice/ice_lib.c | 15 ++++++++++----- sys/dev/ice/ice_lib.h | 1 + sys/dev/ice/ice_strings.c | 2 ++ sys/dev/ice/if_ice_iflib.c | 9 +++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 25e189823072..b14f63de4069 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -4545,6 +4545,11 @@ ice_sysctl_set_link_active(SYSCTL_HANDLER_ARGS) if ((ret) || (req->newptr == NULL)) return (ret); + if (ice_test_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN)) { + device_printf(sc->dev, + "Setting link_active_on_if_down not supported on this port\n"); + return (EPERM); + } if (mode) ice_set_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN); else @@ -9872,6 +9877,11 @@ ice_set_link_management_mode(struct ice_softc *sc) if (sc->hw.debug_mask & ICE_DBG_LINK) ice_print_ldo_tlv(sc, &tlv); + /* Cache the LDO TLV structure in the driver, since it + * won't change during the driver's lifetime. + */ + sc->ldo_tlv = tlv; + /* Set lenient link mode */ if (ice_is_bit_set(sc->feat_cap, ICE_FEATURE_LENIENT_LINK_MODE) && (!(tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE))) @@ -9893,11 +9903,6 @@ ice_set_link_management_mode(struct ice_softc *sc) ice_is_bit_set(sc->feat_en, ICE_FEATURE_LENIENT_LINK_MODE) && (tlv.options & ICE_LINK_OVERRIDE_EN)) ice_set_bit(ICE_FEATURE_LINK_MGMT_VER_1, sc->feat_en); - - /* Cache the LDO TLV structure in the driver, since it - * won't change during the driver's lifetime. - */ - sc->ldo_tlv = tlv; } /** diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index 640bdf8fed7b..be4cc674556b 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -712,6 +712,7 @@ enum ice_state { ICE_STATE_MULTIPLE_TCS, ICE_STATE_DO_FW_DEBUG_DUMP, ICE_STATE_LINK_ACTIVE_ON_DOWN, + ICE_STATE_TOTAL_PORT_SHUTDOWN, ICE_STATE_FIRST_INIT_LINK, ICE_STATE_DO_CREATE_MIRR_INTFC, ICE_STATE_DO_DESTROY_MIRR_INTFC, diff --git a/sys/dev/ice/ice_strings.c b/sys/dev/ice/ice_strings.c index 1b377a1bf518..09adf47a33f2 100644 --- a/sys/dev/ice/ice_strings.c +++ b/sys/dev/ice/ice_strings.c @@ -1046,6 +1046,8 @@ ice_state_to_str(enum ice_state state) return "DO_FW_DEBUG_DUMP"; case ICE_STATE_LINK_ACTIVE_ON_DOWN: return "LINK_ACTIVE_ON_DOWN"; + case ICE_STATE_TOTAL_PORT_SHUTDOWN: + return "TOTAL_PORT_SHUTDOWN"; case ICE_STATE_FIRST_INIT_LINK: return "FIRST_INIT_LINK"; case ICE_STATE_DO_CREATE_MIRR_INTFC: diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 41324cc6779a..5a267671e87d 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -3464,6 +3464,15 @@ ice_init_link(struct ice_softc *sc) /* Do not access PHY config while PHY FW is busy initializing */ } else { ice_clear_state(&sc->state, ICE_STATE_PHY_FW_INIT_PENDING); + + if (ice_is_e830(hw)) { + if (!(sc->ldo_tlv.options & ICE_LINK_OVERRIDE_PORT_DIS)) + return; + + ice_set_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN); + ice_clear_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN); + } + ice_init_link_configuration(sc); ice_update_link_status(sc, true); }