From nobody Fri Oct 23 18:15:42 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 4jBB5q20p6z6xPcT for ; Fri, 23 Oct 2026 18:15:43 +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 4jBB5p5qgdz3L3x for ; Fri, 23 Oct 2026 18:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792779342; 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=BN0gk1T6vq9FfwCf1uXcyPl3UpuN4kaRnlILEjOHKW8=; b=uLBTgCNH4sxi5hjKx8Qpdo4HQWQbUtfu1LcaA+iYPfuBnU20sUqXF0BjdUD0XM+LWtiDIP Bw980tY9o6Du1dUpX7FWZVPn7Ye/8cbuYfVL86JGIksNsHd5TaRsxT7tCEgAAvvW+Nv3mk YyyVrusydzQXXK49oYtyMdh1YcPksrUdan3D+fPGVnXR6VzSjXio6L2aO/wEPOpzCScFJe 8FWWxtD1l3Vlhsyhj7h+C+VURbLEbSYHiJYrDetVhKv46y6PbOZBkZCOH3MCBVvmKsDpYC ENUcP3qSyX4sKf+egIZVxURtN/dnQ7jH0YUFxfUo4qzaDag2/2I8rEdYaLMRPQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792779342; b=d5dBGCCc367pU6X/5EacmN5puY+ALGIuHTxSXGN6rVHHZqy9PlrjDx4DZblV1uxIsblxW2 QU1i7P9rmgcw+qoKdJv65j6nc9Le0PP8kjFNo7oZP19b+GVsaYo5LlppM5rb3NJOXhr1Pw +4RALeqS/D7Vma6fIVcbyfRj2pF3CtjCVQHU/qkhuVOOUefOR9CPWGlVrU/DZO5IRG2mZ/ RzLKG3HPUKUztGLKRnT0uKgDgw0OUYVnrdtyxIGmacXFJUh2ow8ieVqg8SF+1IEy2H9zHB DLhMo0J4rUd9YptZ53fBpKD/KBsjT8qrTkJ3lj3fbamdotc9EWrGW4d6m7KHfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792779342; 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=BN0gk1T6vq9FfwCf1uXcyPl3UpuN4kaRnlILEjOHKW8=; b=lZJRd8Laa45w4vKBi7+yoTnJLbQrM2zG9BBGGQb2GgISwWZgd33r+qUujV27zoVpd/53Za qetc9mITnlSutu6SESl5cJvP18rvffpajFQ8fKSsBUvGJvK0BAVbSSRnGzMjJbsnB7NzKe GfPabjJ21gURsiLPp370W2WErQ9LQJsmQW+JX5B7D9LHSXT/yXdyKRjeSmBpA+7So2J3cO G9sl6zTeQOvv+lgpTXryponS32pgt8nYeVSRyaMvrl5DBl7eDDOv8LjaJ1abzb2N4e+Rna uyEuyvGbX+CplTU+e8hveFagNnc92iEyy84ZJYbN4YPhJZ4AWqog5bvS5iukQQ== 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 4jBB5p5CYhzhBN for ; Fri, 23 Oct 2026 18:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e16b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 23 Oct 2026 18:15:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 2b6479e5b5c7 - stable/15 - ice(4): Fix link bringup on driver load 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: 2b6479e5b5c7a3fec63ec995c952d5d8387481bf Auto-Submitted: auto-generated Date: Fri, 23 Oct 2026 18:15:42 +0000 Message-Id: <6adba44e.1e16b.c1dda72@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=2b6479e5b5c7a3fec63ec995c952d5d8387481bf commit 2b6479e5b5c7a3fec63ec995c952d5d8387481bf Author: Krzysztof Galazka AuthorDate: 2026-09-28 11:47:43 +0000 Commit: Krzysztof Galazka CommitDate: 2026-10-23 18:15:07 +0000 ice(4): Fix link bringup on driver load Patch adding Total Port Shutdown support incorrectly handled a case when this feature was not enabled in the NVM. When TPS bit is not set driver should apply link configuration according to user settings and update the status. Those steps were mistakenly omitted, while the state flag was still set to prevent link renegotation and status update on first attempt to bring interface up with ifconfig. Signed-off-by: Krzysztof Galazka Reported by: kbowling Reviewed by: kbowling Fixes: 0011cd9f8863 ("ice(4): Support Total Port Shutdown on E830 devices") Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D59578 (cherry picked from commit dcb84ddcfe89d358a66cffb45196e6b45b45502c) --- sys/dev/ice/ice_lib.c | 26 ++++++++++++++++++++++---- sys/dev/ice/if_ice_iflib.c | 6 ++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 6fcf6772ed0e..3965196f728d 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -9552,15 +9552,33 @@ retry: } return; } + ice_debug(hw, ICE_DBG_LINK, + "%s IFF_UP: %d, media: %d, TPS: %d, link_active_on_if_down: %d\n", + __func__, + (if_getflags(sc->ifp) & IFF_UP) != 0, + (pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) != 0, + ice_test_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN), + ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN)); if (pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) { ice_clear_state(&sc->state, ICE_STATE_NO_MEDIA); - /* Apply default link settings */ - if (!ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN)) { + if ((if_getflags(sc->ifp) & IFF_UP) != 0 || + ice_test_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN)) { + /* Apply default link settings if link was administratively + * brought up or link_active_on_if_down flag is enabled */ + ice_debug(hw, ICE_DBG_LINK, + "%s: applying saved phy cfg\n", + __func__); + ice_apply_saved_phy_cfg(sc, ICE_APPLY_LS_FEC_FC); + } else { + /* Either link_active_on_if_down is disabled or + * Total Port Shutdown is enabled in NVM */ + ice_debug(hw, ICE_DBG_LINK, + "%s: bringing link down\n", + __func__); ice_set_link(sc, false); ice_set_state(&sc->state, ICE_STATE_LINK_STATUS_REPORTED); - } else - ice_apply_saved_phy_cfg(sc, ICE_APPLY_LS_FEC_FC); + } } else { /* Set link down, and poll for media available in timer. This prevents the * driver from receiving spurious link-related events. diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 5a267671e87d..d72bce8b5468 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -3465,10 +3465,8 @@ ice_init_link(struct ice_softc *sc) } 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; - + if (ice_is_e830(hw) && + (sc->ldo_tlv.options & ICE_LINK_OVERRIDE_PORT_DIS) != 0) { ice_set_state(&sc->state, ICE_STATE_TOTAL_PORT_SHUTDOWN); ice_clear_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN); }