From nobody Fri Nov 13 16:06:02 2026 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 4jR2DV32xRz70q6Y for ; Fri, 13 Nov 2026 16:06:02 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jR2DV2XJsz3FT0 for ; Fri, 13 Nov 2026 16:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794585962; 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=hd0QCXlwFfgcw4bXRbzIcS9g5XN6Ty9eVlxDQE6HV+4=; b=FmDDk1/t3e2upCSEuhjXYT4gudoUS6XBr3lcy7IkmelrEdI6r//5LdMxordMEBRNkyGK37 HG5haWcsfeJi5NETIhSDAQMPvk5E7Dr452ME7/V7bQTP1ebv1JiBDLTda19IahxfGiUGGX w7ZH0oCjd03LBjQ4UyrfDvsLo9Zyn4JomBzfmb8pLq2zs3HRL0GfnURzixTTfOqkrh9J0Z FtHXH2hPIUpA2cJ0/Lm3m9tQeXzp7QLq+RbJIQj44X2UTeT2rlEzUzPp7Dj4ykYKkhyiGE OBTtJuz1G4gZi5bIRRPxS2LUCLkof4x+3ry1mUVrvilkJm89ck+Hdh7/8cae4Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794585962; b=mUMZghF9ldfqN2RpBs4dIMexbqTlF+fZQP/031N/fz1F743WKOqgkfOF7/w4CVsRrZR4M7 ccn9Dc+9VP6YVp99LbQQi2a/mzxPNsONyS2A5lBUqARKjJUSeRKrcdQM3za/+oHOQJj5pP Sv9NLZIqupTLnlNaoDTPpPBmbY9nr+YjUiWXCIE55NYyQEIKC8JR2cUWZPKcLJURZjqWlW +gV82S7MHNRnXrhp4olF9GTqi5HSpz5xrLl5dqNAn5rQsAEpxPysfxXNX7zTU3sxy3e3Ad vvACfYYacL49jQ36ENAy+3PNap0KQOiBP8yQq5nLnsgYpDIKMhs8BaxscbMHKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794585962; 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=hd0QCXlwFfgcw4bXRbzIcS9g5XN6Ty9eVlxDQE6HV+4=; b=USs8/6b37cD3GWobaf1toMdqhv7mtBT8KWtXz7fQSYV5Wr4BpN4aJj3jKWRlZNyryMQTra a/DJl/cI5KgiihzUM8hYD81M0ZN5Gl1CyckjuZzSZJ/M2LtY6fkOnj2gBZt/7TpLVQfi4H dhh8nw4GWtxXgAn4e/2L94Bnn7Ep1pWdIsWP8eYlLv7HCNHarHXBUUQb+6dIyIdCBdeDMP UrUOkUygePB7w+IPjd0+o2BuW2adSUhs+CjeqF2P/76PKnfGdzEpbcrwVCLOJd/Zbz2XJS VK0yEj1s/3VcU5M1LGlywxiyRJ3t7kvMRHhqOgvKcMH0Wortqf1iirSVAqzkog== 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 4jR2DV1wlczj6W for ; Fri, 13 Nov 2026 16:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 10582 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 16:06:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 83067a22396f - main - ure: Initialize ifm_active in ure_ifmedia_sts List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83067a22396f5609f3e8be035eb8f316ed52b895 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 16:06:02 +0000 Message-Id: <6af7356a.10582.4633ecb4@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=83067a22396f5609f3e8be035eb8f316ed52b895 commit 83067a22396f5609f3e8be035eb8f316ed52b895 Author: Ed Maste AuthorDate: 2026-10-30 19:26:28 +0000 Commit: Ed Maste CommitDate: 2026-11-13 16:05:36 +0000 ure: Initialize ifm_active in ure_ifmedia_sts Most ure(4) devices use mii; 8156 and 8156B do not and have special cases throughout the driver. ifmedia_ioctl() sets ifmr->ifm_active to ifm_cur->ifm_media before calling the status callback. The 8156 case in ure_ifmedia_sts ORs in the subtype and duplex flags to the existing value, which may result in garbage values. Instead, start by setting ifm_active to just IFM_ETHER before ORing in other bits. Reported by: llm-postcr Reviewed by: kbowling, pouria Fixes: d4cf41a99b40 ("Add support for RTL8153B, RTL8156 and RTL8156B to if_ure(4).") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61158 --- sys/dev/usb/net/if_ure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index a3468d7869f4..5024d1c869fb 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -1439,6 +1439,7 @@ ure_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) sc = if_getsoftc(ifp); if (sc->sc_flags & (URE_FLAG_8156 | URE_FLAG_8156B)) { URE_LOCK(sc); + ifmr->ifm_active = IFM_ETHER; ifmr->ifm_status = IFM_AVALID; if (ure_get_link_status(sc)) { ifmr->ifm_status |= IFM_ACTIVE; @@ -1457,6 +1458,8 @@ ure_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) ifmr->ifm_active |= IFM_1000_T; else if (status & URE_PHYSTATUS_2500MBPS) ifmr->ifm_active |= IFM_2500_T; + } else { + ifmr->ifm_active |= IFM_NONE; } URE_UNLOCK(sc); return;