From nobody Thu Mar 07 18:55:29 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 4TrJQp02V3z5DcL4; Thu, 7 Mar 2024 18:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TrJQn6Jpxz4X6D; Thu, 7 Mar 2024 18:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709837729; 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=AFeUYJ8AOEcTGmDi7NktkemDS6RwlXhiX5MPElspYr8=; b=St+yUYhGV3deaUJru8aoQiKkiCRg/DInvq97ou36TFJK3tCd2mXahu0Ahm4HYV6tHYR8kt cyyPPyDUlaxWW+PVzqzhLZiyqAY0+n1KSgQro84jcaGC1p50msFZmcfJ2USgviK9EQN2wu X1KJOri0bLNsCo211fnyFHSvp4IAbWtYOBHbR7AULu/jzXoQgUuywnHOWogZY9aawHgzYt Ywxk79Z0PkExg2WEVwx+H+hV8n6GqKDh78INEO8tkpOgeZTGrZhlUPclC7SMm+eqMWLUdB UNBXWoQVKaapmlP7d5MVlduc2MDYfar7XUEHEq/88As7N4NpmH+nM52zN+8+QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709837729; a=rsa-sha256; cv=none; b=yqjJvJznIRgrpgiX0tzUmwnUIeunSiXWo7VeA5JhNH5o9HQ9SbiNFkaRcqFa5H3+r+fR8u RMFeJqFyeyJ/ORssrGQBd3fscMldJSOeJg0MliCFm0esmwyuL9JSk9fXLiI6xJU995bQrf GNvGW/08JRcuGJ2BEnEmYvqrQAvllIur6QdotAqY2Gwr3JqlPEL+2jmZsZtTS1tpjcj70U jrHCyjrHORprhJ8grymKyCaHbMU9wmiE3jIVDoFEV8bEmTaTSNsIynCN0vVMRmrIyw/s8J 3QvobYtMgcEoKj6gHLyUJ+TKNHoJjXID47Ac/DLvMe22rNAwVsX1GRwlFmZ5GA== 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=1709837729; 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=AFeUYJ8AOEcTGmDi7NktkemDS6RwlXhiX5MPElspYr8=; b=NHcXSHvJPiI2wIjKUQYqR3jxLO+xEnqPOc6glGEYO7o+Y1xVgyJYZ6GzyeoDPl2bFeV153 pDthGdFpPoUWecKAimcpm2PXsFSWq/UsIv2Gw18YDZEe9YCE359cRCvDKpxA9BYhlwbMMX vyNqKu8Xx4xrwIHF9eiDOplLbDwZcK8o7c66D2Pi1sHDgGBc6FHkkSmdMQgy6tFtKsF/BR IwPX8ZuGMGiLwCwWAXkDLsecDzKApvQcYUsaa5qcJHiFuayxaryc6xAYXUswO6OcjhZnqj t/OcSMDdUiIY9OdCpgZfFZA661tsjxZe/JO5VPtFYiY4pdoYt9Rrpte7VhbRIg== 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 4TrJQn5wYvzmbp; Thu, 7 Mar 2024 18:55:29 +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 427ItTJw012329; Thu, 7 Mar 2024 18:55:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 427ItT45012327; Thu, 7 Mar 2024 18:55:29 GMT (envelope-from git) Date: Thu, 7 Mar 2024 18:55:29 GMT Message-Id: <202403071855.427ItT45012327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: 7cbffbfcd9a5 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cbffbfcd9a5185be61bec65790674159bb7c0a8 Auto-Submitted: auto-generated The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=7cbffbfcd9a5185be61bec65790674159bb7c0a8 commit 7cbffbfcd9a5185be61bec65790674159bb7c0a8 Author: Chandrakanth Patil AuthorDate: 2024-03-06 13:13:07 +0000 Commit: Sumit Saxena CommitDate: 2024-03-07 18:42:39 +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 --- 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 e3d82214a8a8..8439504af49a 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -3071,6 +3071,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; } @@ -3101,6 +3102,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;