From nobody Mon Jun 03 19:24:48 2024 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 4VtNw03mFbz5Js2f; Mon, 03 Jun 2024 19:24:48 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VtNw02RTdz4TtW; Mon, 3 Jun 2024 19:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717442688; 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=N2wa3mLJEfLgabDBTLvaKO5uGfz/qogtaEnUUoir7ic=; b=uW0DHAQWK10XE1kLOTBh2PpgxsfOz9PfsxyfGK6gJ8p0KkqHhMpfY0QPgvZtjFqmKwNLcO /CEvXfCqa111s8YF1nMS7/DucODhRxzs71XX3a5faLNjO+U7cuMPAC6pehxqUr1cGPrhKv nWgO3va2YQbyjFyjZhOx0q6UFbo0Tur+2JoWnJQR54GAHZCFFhFWjyFoX5LdSasrnX9Zbx JqitH90h8syfeGzNGyRdPdKrFArmV0UvSu73/XJ1l3m1Qo+fpJwM7hsyd3+8Ws2qQrWxw8 /rEjBRaDTpM70j6QyzK4n54MorfNiEcvWNmIQsfjHJZR2WLdUyPrn++uK5gViQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717442688; a=rsa-sha256; cv=none; b=EN6zFW3QbHYrpHA1KavAzRTKcqhuf7FhItICsyDc9BLT4iIHu6fGYFpP5mhlFltYkML74B maYb3cuNAsURGMkcGsagk28JacnGZURnDu23uanBQxOIz3s2R1ynUCWwbPsehdj3u86TSu cZ8fg9sgFp4j8qyKPfnSRni2AZfzmE+EvP91jXn66CaMHUscbaFmIxitSo+yMBenHTfVAm Ybv5phak0bxPXATYhvYPHkehyZsMCVoI9r4Vt6mT45EOhCdhFg5KRl0YnI/Ji1bR7qMQaa bguhb/WapYnWPmM9cuCml4v14Iy88jQchyGxSN9vum5wnrXU7onMVa6L5blWXA== 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=1717442688; 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=N2wa3mLJEfLgabDBTLvaKO5uGfz/qogtaEnUUoir7ic=; b=N9uFKmIsLYcL8AbDaZ0j8PDNool+X0IA+ToJMHtJ1N/1wHbrn0eAMdyTllh1HKll2kkZt0 HFmce+ooUH19tgHkO4FHk/5pQUTQyt3dRTyHD6CqdtfCMoprQrallno1Zn8eB3bkxN2/WY ycyguWqfVmsdXdW7tzdZVwrFRF2ccG8EYa8aCq/pfjceDoDTNzBJYyhBlqW21tnCbOtRd6 7kBJP9NeDe4KkA/fOIrRiHjUmurFa3nFzh8qysp5JHOXI29eE5DgF2+oadeZedJyCYWqMs l9XRQH6SS/yrOnYpHwC/yuMfx7oal4lgFRMtiy7VYd8pLsdjoqKIRT68wx2Zwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VtNw023sVzndw; Mon, 3 Jun 2024 19:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 453JOmF1067332; Mon, 3 Jun 2024 19:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 453JOm3r067329; Mon, 3 Jun 2024 19:24:48 GMT (envelope-from git) Date: Mon, 3 Jun 2024 19:24:48 GMT Message-Id: <202406031924.453JOm3r067329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 6288beb31e0c - stable/14 - if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot plug 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6288beb31e0c1bb516ace7b7eeafa412a6642444 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6288beb31e0c1bb516ace7b7eeafa412a6642444 commit 6288beb31e0c1bb516ace7b7eeafa412a6642444 Author: Chandrakanth Patil AuthorDate: 2024-03-06 13:13:07 +0000 Commit: Warner Losh CommitDate: 2024-06-03 19:23:12 +0000 if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot plug Currently, if a media type (e.g., DAC) is hot-plugged out and another type (e.g., optical cable) is hot-plugged in, the new speed is not reflected in ifconfig. This occurs when the driver fails to update speeds with unchanged tx and rx flow control. To fix, a phy_type check ensures update of phy speeds upon detecting the new phy. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42951 (cherry picked from commit 7cbffbfcd9a5185be61bec65790674159bb7c0a8) --- sys/dev/bnxt/bnxt.h | 1 + sys/dev/bnxt/if_bnxt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/dev/bnxt/bnxt.h b/sys/dev/bnxt/bnxt.h index 2b5c16e263d7..4484c8db5430 100644 --- a/sys/dev/bnxt/bnxt.h +++ b/sys/dev/bnxt/bnxt.h @@ -298,6 +298,7 @@ struct bnxt_link_info { uint8_t last_link_up; uint8_t duplex; uint8_t last_duplex; + uint8_t last_phy_type; struct bnxt_flow_ctrl flow_ctrl; struct bnxt_flow_ctrl last_flow_ctrl; uint8_t duplex_setting; diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index 70d699d4b419..8dc151121311 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -3072,6 +3072,7 @@ bnxt_report_link(struct bnxt_softc *softc) if (!link_info->link_up) return; if ((link_info->duplex == link_info->last_duplex) && + (link_info->phy_type == link_info->last_phy_type) && (!(BNXT_IS_FLOW_CTRL_CHANGED(link_info)))) return; } @@ -3102,6 +3103,7 @@ bnxt_report_link(struct bnxt_softc *softc) link_info->last_link_up = link_info->link_up; link_info->last_duplex = link_info->duplex; + link_info->last_phy_type = link_info->phy_type; link_info->last_flow_ctrl.tx = link_info->flow_ctrl.tx; link_info->last_flow_ctrl.rx = link_info->flow_ctrl.rx; link_info->last_flow_ctrl.autoneg = link_info->flow_ctrl.autoneg;