From nobody Fri Jul 10 14:19:44 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 4gxYr045tCz6lCb3 for ; Fri, 10 Jul 2026 14:19:44 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxYr03VFFz3s4n for ; Fri, 10 Jul 2026 14:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693184; 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=Pko7GNzLFgvsMM90gaIij++CloIgVC/QcWU0iIcKSuw=; b=Ja+wtWCbm72HIK45yjmcz1fXPibXExx+rBG6l1Tp8XHUBphtUinaaDNWqH4lu/mEGfe0BP OY81f9Z1HvcfbC4angBVBfIz7bkXQ+Ijd4j9kmlfek2csvGD+09722sNfayQkD66Okn0Lg Zw0luEX711WOjHgj3OxbbDJtMvdPWNii/i8VQXiAX/JpS8RiJvi7qBL+tsVQPXVDH667Su zfk2uEvmFz/wIk75Kx2lNHMkE6WuBy+4RHgQKvRJPi9J+N2BbwbwOOr+/jdzeqC/Z8rpil YxX1jnBQkARBnWCjHf3cmfEu1CUMnKl47qtPzMegaLVOnwncJW8vnl+iB0LBQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693184; a=rsa-sha256; cv=none; b=rQ5yZKUxxU0oo9FTCtPWy7rYohaLZ1tRa9vTInmxSxQg+lXtiCzB5hCSW28S0VvtQn8MnQ 9JVV3tsS5J0JWYZu0/JPu0wNlaX9WCLY4O/BS/B3VUN1CYdFRDOSuJwRJQ0Iq6wmpOvyba OpbzEJ+nG6Gc41jccfhpNU+wLlJbI38kzkfdaYsMyjGhhkl84NiV2gnKbo5W6P8DwJVvOU c5UCuSTHseXqNTPEP/KB2tLmIVyeWnuDuF4V9c4Znudl/ZKA9UvQMe7Qei+jrgtkp507Gu FJnofLU/+YfYRrJ7gS6ExvlrVrtIfxTMMF7Q1KT2wmYcnQbI1795WbFlKsTQOQ== 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=1783693184; 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=Pko7GNzLFgvsMM90gaIij++CloIgVC/QcWU0iIcKSuw=; b=bjnt9m4z2zj7rxjsN+BT6PQHxQpinYlEyv53ID/gKr+2HdDkm9Eu6endbwZTCc4uVJ3jP5 0jQG0RdsvR53Dhm98aIGTqhR780c8Te7Rtb+45Wm7+ztopyKKiY3FRK58ZCkF2x7DTkvEX G6eIz9KpVxsVftTRNf0UCiNx6mtAC/ShPjefkWItKHIteTkMaWMkOiCrTklRp8gpXuQFC9 A34CkcCwDsrNNvToiPqNOrDQj/MLt+qhoIW1226mIjz+sk9uGqjywgjHBgvp4ZR0wsc4vw 5vRe2W7kLyIq1K8pCoMmhbw8U/ITUzZwSwNE4jLrLFoPRTo4+yaGJm6H4h6OZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxYr02MvszygK for ; Fri, 10 Jul 2026 14:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24b66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:19:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 9e1571c3a127 - stable/15 - ice(4): Fix link speed after changing cable type 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 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 9e1571c3a12758a7bf0defbb52c35b0444b63cb4 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:19:44 +0000 Message-Id: <6a50ff80.24b66.6f9d23ea@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=9e1571c3a12758a7bf0defbb52c35b0444b63cb4 commit 9e1571c3a12758a7bf0defbb52c35b0444b63cb4 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:56:15 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:19:23 +0000 ice(4): Fix link speed after changing cable type When interface was connected to a link partner with a cable type limitting maximum supported speed, e.g. SFP+ cable in 25G port, driver incorrectly saved a supported speed as the user configured speed. This prevented interface from using all supported speeds after switching cable to SFP28. Link was established at 10G as supported by previously used SFP+ cable. Don't set user requested speed unless actually configured by an user, to allow automatic selection of highest available speed. Only when user sets custom config using advertise_speed sysctl save it and try to apply after cable is changed. Also don't save initial supported speeds if FW supports reporting default PHY config. Signed-off-by: Krzysztof Galazka Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53611 (cherry picked from commit 310145642312e1c5fb3d8efa8321cf905d0354c4) --- sys/dev/ice/ice_lib.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 442111e5ffaf..cfaa54bc0306 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -9680,8 +9680,7 @@ ice_apply_saved_phy_req_to_cfg(struct ice_softc *sc, finalize_link_speed: - /* Cache new user settings for speeds */ - pi->phy.curr_user_speed_req = phy_data.user_speeds_intr; + /* Update phy types in config */ cfg->phy_type_low = htole64(phy_low); cfg->phy_type_high = htole64(phy_high); @@ -9987,16 +9986,21 @@ ice_init_saved_phy_cfg(struct ice_softc *sc) device_t dev = sc->dev; int status; u64 phy_low, phy_high; - u8 report_mode = ICE_AQC_REPORT_TOPO_CAP_MEDIA; + /* + * If the FW supports Link Management V2 we don't need + * to save initial PHY configuration as it can be always + * read from FW. + */ if (ice_is_bit_set(sc->feat_en, ICE_FEATURE_LINK_MGMT_VER_2)) - report_mode = ICE_AQC_REPORT_DFLT_CFG; - status = ice_aq_get_phy_caps(pi, false, report_mode, &pcaps, NULL); + return; + + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA, + &pcaps, NULL); if (status) { device_printf(dev, - "%s: ice_aq_get_phy_caps (%s) failed; status %s, aq_err %s\n", + "%s: ice_aq_get_phy_caps failed; status %s, aq_err %s\n", __func__, - report_mode == ICE_AQC_REPORT_DFLT_CFG ? "DFLT" : "w/MEDIA", ice_status_str(status), ice_aq_str(hw->adminq.sq_last_status)); return;