From nobody Fri Oct 23 18:15:41 2026 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 4jBB5p0FRvz6xPyD for ; Fri, 23 Oct 2026 18:15:42 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jBB5n4k7Wz3KqS for ; Fri, 23 Oct 2026 18:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792779341; 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=gI6rTKjMrLgboSENX7Mm5Mr1YrZvrJlkOaT4ZSoBLgw=; b=ubfK/pJbYDl3QiDYtpTOvz1DXSgvlsF3iuynPgB5ggRJL5UOUhB2sc28xslHcCb4hODF9N ercznBFMnf6yghxTrBS9iSXwho3g6lgXh7B4xt/bcv0zsEOXXrc76YcIPuE5oTHMHfGJwe 3yR1I0GBc01PhJO79egE+UMqxshA5558Ghzyw151c4UjgdHgjyEe+6TTVDFQoobE/MaxWa sD9QaEEyQ+v9a+BgOEBUY+u66anRTnkSeu0S0y7r7hKhhKklZBuXhBaMRd/uTA+fFdSwWW LClGnvK+Bq8EixyRtNYg9+EbpnD7gscBW/ZUEdw6wxAhoPfTIFPIHlTcyJ2Rvg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792779341; b=nucmpUEJXoKAt1YX69pInTbI3we1t+MsR2qwB/bzGxb6pxkdTVImmOzx2qU2O2IyQokT97 EE1Ox+tFG/+7zZfv86+lxzIVXBeWBLch7BClH3icIG5HL+3PT1t2DGVqDAj5Fo6fgDAXtC Q08FOpONzbuZvVQa/TCdngG/nRMpzRKFWCnHuaSWo0FLN8x9GUsu8x1gh6uMYJX8yfmqsS DPo8w+B+kcU7HbnjqRrIV90HgI2f0kxOHEq8DDbgRpe/vjSz0TKmooIVyDstOY7CgM4lF3 XbJiTl4XbgEl2q6QGlL8s/B9Ewf5jnpdMrSAHR5CpZC0FkbtCnC/jNcnd0nPhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792779341; 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=gI6rTKjMrLgboSENX7Mm5Mr1YrZvrJlkOaT4ZSoBLgw=; b=ZT8KFTIu8MeH6OEDlS1DQpDcmUS6Qy79nHX10ImzCOzt6DbcDLF+tlIoUFIc1vwruVyDuX RKqW402UwxwKORExwbcclvTuVBzjPb2TMLccj6KX5tPQWc0SoB0k7RdkrGET7DwuKgkFdw b/1t6IzFONrhG4w1wUpy49FycKVBOm4fwiQd2QfEM2wpPQwEV0/dhElPoaci9q6bWtujjW gfstesydQtPQm4zL83FD5W0do30vFsbR5CqJ7eprxHZALo/1y9oU6Yq6FOHa7iG8ZdnQpq C4d1f3/0i0/o7zRAhquWF2gifocooBxGo3lwYCbftrwT8m5uwMkyRruadPRAxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jBB5n4LwZzh0b for ; Fri, 23 Oct 2026 18:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dc18 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 23 Oct 2026 18:15:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sobczyk, Pawel From: Krzysztof Galazka Subject: git: 8b5c666591ae - stable/15 - ice(4): Support Total Port Shutdown on E830 devices List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 8b5c666591ae0e229f7b49f3b8283826e910936a Auto-Submitted: auto-generated Date: Fri, 23 Oct 2026 18:15:41 +0000 Message-Id: <6adba44d.1dc18.309451ec@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=8b5c666591ae0e229f7b49f3b8283826e910936a commit 8b5c666591ae0e229f7b49f3b8283826e910936a Author: Sobczyk, Pawel AuthorDate: 2026-08-20 16:35:12 +0000 Commit: Krzysztof Galazka CommitDate: 2026-10-23 18:15:07 +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 Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D58149 (cherry picked from commit 0011cd9f8863fce3743bfd9920b7924162bb6410) --- 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 9ae27d7bed87..6fcf6772ed0e 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -4546,6 +4546,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 @@ -9898,6 +9903,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))) @@ -9919,11 +9929,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); }