NYiGYShbKEnMClwQHDsijgzovXucvfGt0pusu/TPxcgrCnq9ANapv TOA479iGdkjuZ4Gu20yBDAK/jIpLuSOpN8vwjJVGja7HWJo1+/1/fkOwHSylfegEkRWT8n u4tVUrh3I5D2UNTTWBwNiJ6df6dhFR4Wzj7kbTkRTa8+qlNQv3AdujCas8+6HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769469843; a=rsa-sha256; cv=none; b=xhhyWHo0BXWmejaiH6I9fwr0Px9sz8uBcR6wz9UTQR1ag+3+bZFDQyGpmQsK9QfEpFFHem 9ylgBJmaid9uBP8Xo3Rd+VtWlvqQrLCGiNtnrdTVlVpzY+qzl+RD+ByLFp7Gpqh207nKNU Ny+Ez2EXpDf5vaFNDxZ2NYtF2k2T2YPMVP//a3AiyODXjlM6uZfhGwGHuEanf55lC8KQUU Dpr/LSBac02gzwblmDXFDajQGr2FnESDoYAkGrDsi0CLLm4A2uaEnLRq7/IVhy3ULJKtdF zK1hvYThY4+6OPNuGaBpoN3Ghff+0u/9JSDLBj0/OMkgmIb2EA6yxjzwbsEQGw== 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 4f0PkC559HzjKy for ; Mon, 26 Jan 2026 23:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d555 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 26 Jan 2026 23:24:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Ana=C3=ABll?=e CAZUC From: Pouria Mousavizadeh Tehrani Subject: git: 69de2b4e9679 - main - bnxt: don't set media status if link is down 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69de2b4e96794793f04d1b323d354fcde3c480f6 Auto-Submitted: auto-generated Date: Mon, 26 Jan 2026 23:24:03 +0000 Message-Id: <6977f793.3d555.19deb8ed@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=69de2b4e96794793f04d1b323d354fcde3c480f6 commit 69de2b4e96794793f04d1b323d354fcde3c480f6 Author: Anaƫlle CAZUC AuthorDate: 2026-01-26 23:06:02 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-01-26 23:21:48 +0000 bnxt: don't set media status if link is down When the link is down don't set flags other than IFM_AVALID & IFM_ETHER This avoids `media: Ethernet autoselect (Unknown )` on ifconfig Reviewed by: zlei, pouria Approved by: glebius (mentor) MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D54573 --- sys/dev/bnxt/bnxt_en/if_bnxt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index fa37d04e0884..a34bd1a7e511 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -3280,11 +3280,10 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; - if (link_info->link_up) - ifmr->ifm_status |= IFM_ACTIVE; - else - ifmr->ifm_status &= ~IFM_ACTIVE; + if (!link_info->link_up) + return; + ifmr->ifm_status |= IFM_ACTIVE; if (link_info->duplex == HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL) ifmr->ifm_active |= IFM_FDX; else