Date: Tue, 03 Feb 2026 09:34:06 +0000 From: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: =?utf-8?Q?Ana=C3=ABll?=e CAZUC <Anaelle.CAZUC@stormshield.eu> Subject: git: 79c748ed4343 - stable/15 - bnxt: don't set media status if link is down Message-ID: <6981c10e.3e429.106f04d9@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=79c748ed4343a80fa1cf1d908c916d27ee277503 commit 79c748ed4343a80fa1cf1d908c916d27ee277503 Author: Anaƫlle CAZUC <Anaelle.CAZUC@stormshield.eu> AuthorDate: 2026-01-26 23:06:02 +0000 Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> CommitDate: 2026-02-03 09:31:02 +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 <full-duplex>)` on ifconfig Reviewed by: zlei, pouria Approved by: glebius (mentor) MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D54573 (cherry picked from commit 69de2b4e96794793f04d1b323d354fcde3c480f6) --- 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; elsehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6981c10e.3e429.106f04d9>
