From nobody Tue Aug 11 21:00:12 2026 X-Original-To: dev-commits-src-main@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 4hKPCK0Qgvz6X17r for ; Tue, 11 Aug 2026 21:00:13 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hKPCJ5Rm9z4CfG for ; Tue, 11 Aug 2026 21:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786482012; 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=GoWd/WKxy8ztTLWI3i6JXJvOBOCob8GlmHO2r7dKvpo=; b=OUFyMh4e1i3gS8YmPAaJPQ/JsiGmt+fGRC+FUsYOCPJPlwAm60l7NuEYna0Z3hWw6rR3Uf ShgIYfqUMKLsIyqAzaC/EhEnmW+57wzlOXepRe+/yNv9U+5DLYDZPHj9uTXv38bo6oPdRO 4tah9KDNKTjTHDJN4jREnL5WgZV4n9YGvgrX5CVZA3FQ6dGuSThw8PDz+uTzmL9kF6duXA vRpywTvIyYp8S+00p9CwQ8SOwDintdHtyzXv9NnNq0qcoIRwXS2Yl5PTeFGPFW9+giYHW7 nim9Aqqmx5gYL0KVdIrGUdtTUUWQ7vZC3lO4vR+g0Lw/VcB2HhHbctMY/59iPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786482012; a=rsa-sha256; cv=none; b=IjXO5i4/pt91qyWsq3UBlJNvSYgkD3PZYNDD7avwHASlKW4OD40s0HHG7zTSGdkdHQXotp y9GRinuI9szqHax3RjddOeYCX0c1BD7Or3si250ZCMFxrInJKy9/tUGqjlWQpXO/FXKGS8 SsMuSO37OmLEEo6wFNvkVwGV390lQQUeIGzHVJNA+R5NE7LB8TKMOZE49fU7e7XidBpHah fy/+eyx073M6PceHKZ0a1smVfhRHJsPnKss0VSMEohLH6r/nxQpdY9NxHMGGyA9fhf5bMK 9BWS96v6o0aqscwQUD8/MwHrIZ0x9KP6HiloqTNzK6Qwes0yaRWAKPZMdNVzRQ== 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=1786482012; 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=GoWd/WKxy8ztTLWI3i6JXJvOBOCob8GlmHO2r7dKvpo=; b=cI5htPz+WpsqoBW10A0ibtJFouTyGj/Msc5p0begBmDSyohDqCy3dOKo60ubsYJHp7z+Vs IydqJm3k42UfnWwakx9JiG1Adgs1bwfSDjYMZf/Ltnii+Ut42lM1vg+l4NiBQPtaYsYEu9 iGFtl754yo9yNoP3KQTmaDoedXskz8JXBol/dhTDPne1aDw4T7aTkYZnfXbm8AdrsbUKn/ J2wyGwQruVEhn6Jzt8jdLVBDe6MuPggmUrpDhdBfOJh8ETEOK0Fdon9DJjeZVBDE/woGUM Vri9baVyYskIWiTv90c42yV73G95qFhMxCz9U6xMGvP0pSt4uGJRCXDypZ+kpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hKPCJ42wqz19Zt for ; Tue, 11 Aug 2026 21:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 11 Aug 2026 21:00:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 13a747009656 - main - e1000: Avoid signed shifts while assembling PHY IDs 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 List-Id: 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13a7470096567480676e24545b3c1d6404f3f2ec Auto-Submitted: auto-generated Date: Tue, 11 Aug 2026 21:00:12 +0000 Message-Id: <6a7b8d5c.370ba.30b6f413@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=13a7470096567480676e24545b3c1d6404f3f2ec commit 13a7470096567480676e24545b3c1d6404f3f2ec Author: Kevin Bowling AuthorDate: 2026-08-11 19:40:48 +0000 Commit: Kevin Bowling CommitDate: 2026-08-11 20:59:33 +0000 e1000: Avoid signed shifts while assembling PHY IDs PHY identifier words are promoted to signed int when the cast is applied after the shift. Cast each 16-bit register value first so identifiers with their high bit set are assembled as unsigned data. MFC after: 2 weeks --- sys/dev/e1000/e1000_82571.c | 2 +- sys/dev/e1000/e1000_ich8lan.c | 2 +- sys/dev/e1000/e1000_phy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/e1000_82571.c b/sys/dev/e1000/e1000_82571.c index fa010075f367..d02efd08a163 100644 --- a/sys/dev/e1000/e1000_82571.c +++ b/sys/dev/e1000/e1000_82571.c @@ -485,7 +485,7 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) if (ret_val) return ret_val; - phy->id = (u32)(phy_id << 16); + phy->id = (u32)phy_id << 16; usec_delay(20); ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); if (ret_val) diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c index 1fbdc35e74df..eb6971b0e530 100644 --- a/sys/dev/e1000/e1000_ich8lan.c +++ b/sys/dev/e1000/e1000_ich8lan.c @@ -211,7 +211,7 @@ static bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw) ret_val = hw->phy.ops.read_reg_locked(hw, PHY_ID1, &phy_reg); if (ret_val || (phy_reg == 0xFFFF)) continue; - phy_id = (u32)(phy_reg << 16); + phy_id = (u32)phy_reg << 16; ret_val = hw->phy.ops.read_reg_locked(hw, PHY_ID2, &phy_reg); if (ret_val || (phy_reg == 0xFFFF)) { diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 8b00a80337a1..7d12d98bffd8 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -238,7 +238,7 @@ s32 e1000_get_phy_id(struct e1000_hw *hw) if (ret_val) return ret_val; - phy->id = (u32)(phy_id << 16); + phy->id = (u32)phy_id << 16; usec_delay(20); ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); if (ret_val)