From nobody Fri Jun 12 12:19:30 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 4gcJVB5GMVz6hhwg for ; Fri, 12 Jun 2026 12:19:30 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gcJVB4ZH3z3Hgv for ; Fri, 12 Jun 2026 12:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781266770; 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=qAVN3si49eX1EClVksIPeuHjj6w6sYWRJq79+DQA0oQ=; b=TnpFM5WbtdlrliLC625ZnDNqoWx7+6axu6M5dJArGJ76ZnhCmBzlfco+rsDez4k7k/OLZY mywAlp54GX+XD7gtsqkse1gkS9fOyzNaL7CCzMwXZ9kiYAMq3TjrH7oRhOe+j0jWYqYjHm 0p1gz2c641hI6mnbL2rL5c8FWGG7Is/QszSudSJhTEDzFaySsDHRopIo4lF1jZjFsMsCtO DCD1oc32/8mWgGXQDokV2YK48Tne9NiQdo9SVbcaY5JgeQdnJ6FnPj3bU7UC/DySezWfW+ G+0Bx99SUzzvq+Y81kQ8jjC0bBu3lIRgfW+UYpHHbrwuJe8mV0eco39I8AyxrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781266770; a=rsa-sha256; cv=none; b=Ajgmb7tDrSWAIWF10eeJwuyyo53p/tJfdvkw76UI5dcdv2F9MVwSzIygbbPI757nKKPcSY VwByNiVPcpxQTdyOuIhtERwIKosr3k9eZ0IHHmZsZcmYuH2YVNTlcOFvhfIE9dfk6+NFgu Uyhe2A+n1lhqcGg2hjK2neHqg848OKFeS3s/W28tXWWMPWQ/o1ZYi1N7y9KqOHCvfY3QZ4 SybBJ5LxkZpg9/B0vc/j7yLFnpstKFKJmYjPu7SqIGOKtWVTq6nbuVGdK598hjBMenk/XI Fz27tGNL39F5IVi4NMpPzu3vqqzgZpV9n9Wt1SHWOTf/whBLshgGR5i7NJxD1w== 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=1781266770; 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=qAVN3si49eX1EClVksIPeuHjj6w6sYWRJq79+DQA0oQ=; b=kGp3a6HqFUR78Ol5e7Z8hpyHtADrMvWzyMKhycW5tBo2NuBCrAXvlbpMKA8FnHhF4IZ4Xx isP3mHCH7A5npJVIl417x5f38syrgJoJ8lwqDqaPqsYyNK+IGMCPRKYfHaGPPB0S3qsZik /WUZpKgMBBLzsUVQdxcXRZ38vgsOYxThXlG9s6Fp7h5/K13mJdgMnH9jAK880JYwtvxSqN 9E04dk3vnY2qcOvb49/+lDA8GzaZ8YxyPyGonpdhxv+fPkvhqWRgWytZaB+F6xemzdcdsz wc7Eu/DVdl7KXsDnaCoMdt+b3A1Ub1AW5vB2kntyWa0p89f8Gneb/6xmKqVYew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gcJVB3fRPzd23 for ; Fri, 12 Jun 2026 12:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44a35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Jun 2026 12:19:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Krzysztof Galazka Subject: git: 310145642312 - main - ice(4): Fix link speed after changing cable type 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: 310145642312e1c5fb3d8efa8321cf905d0354c4 Auto-Submitted: auto-generated Date: Fri, 12 Jun 2026 12:19:30 +0000 Message-Id: <6a2bf952.44a35.4971799e@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=310145642312e1c5fb3d8efa8321cf905d0354c4 commit 310145642312e1c5fb3d8efa8321cf905d0354c4 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:56:15 +0000 Commit: Krzysztof Galazka CommitDate: 2026-06-12 12:19:06 +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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53611 --- 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 baf5c6889aa8..25e189823072 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -9654,8 +9654,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); @@ -9961,16 +9960,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;