From nobody Tue Aug 25 00:31:52 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 4hTTHY2Mlkz6pNBN for ; Tue, 25 Aug 2026 00:31:53 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hTTHX3S8Gz49rK for ; Tue, 25 Aug 2026 00:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787617912; 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=gI1IZrQCEjEFFoG4NSV+kANtLxmpnGfc95m26a0R1WQ=; b=Gcywd9K4+8ijUuQK64LNlgcDP/Y/7ZLHJNyhGj/dyvgHNQEFZ0y+1Vpea5O+BRgdjwdwUx glq01Qi94fxIi6/weVlZiusHAxQmxa6JDJweyeicno3vL3y1r2Ib2Y/h3e96zTNzDxgLJ1 q4aUMn1vicGDl7b4KJM+K9kqQZsLltCFBv30AxV5PnEIIJ/KMhDjZ7uPdy4/AXQhhMMOrj s+2bc9cmWZS1ic2UL+8NIxXLIP34SiH2hsKGyneiei/lZ2++OL3WjjNJ4tuxWwsWwsP2ce tLBXXKdcNKYUXAFaa/A6qOUdZQOvbxYkUppViIHx5fwDnNUwXmPm0Yw2wFT3lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787617912; a=rsa-sha256; cv=none; b=tgR2QOq8/9fQRFp8k9eRf2NTYTaXvoGVtZ9cZTS4daGKAaWj0h8qw4Go4m5U5w/0Gdrf8S eDDR9WW1xRbn9vnBguYC/hpWLxeKsjU5oDHnw7BOdOPc8Dg23mFSqMOFfOLr5ofUy9Q7Q0 mDyayZdFOLflMkJEcRB7P5o7N1ooIfJg7Bukfw2k5lrRLh2aW3HkNRg6dkiRzugEMna2tG pgPr9n6sG8EPhyXdzn+wQqAzO4s2GvXt3SWtUjVYKgqRMm5NllMDXLp2PnA8BahykiBJI7 osDET+p9WdjHeuAHLe6b/puGSWkFZ7iQN7woeaPv4PE+CvLtuilB4Tj3zx/tgw== 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=1787617912; 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=gI1IZrQCEjEFFoG4NSV+kANtLxmpnGfc95m26a0R1WQ=; b=l3Zg3L2s5z5dvZsHrUTtRAFLcCWxzaOgM2tN5cOWBX+QAiPjzQBOSMGj/zeKotNmqKAd+8 KU7nPObS3pRkovPEt6kB7gOAKpKrznb80epFj5LC9Cs1yiKc6EHT9O6UhjGSLmT8FSte1A ifyOTKw8jHPxy22Vu0RG6AVVGNZs6NOqVJZcAqtB9cld8Q9xNQwMNS6hkKWqiGGreOv6R9 S2eTz5+GVPLTK9kQ4r8g0G44+qOi74IXCMiPX9nwJqZYE98GD8pi7cv5DYhTi/csbdbrPb SzQCzftxARWceAwo+eAATfsyGvNwOkYSzkNECHksRMGHehfPGZvvVMTMT1wxjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hTTHX20PYzC0F for ; Tue, 25 Aug 2026 00:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e6b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 25 Aug 2026 00:31:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2a21a77a2113 - stable/15 - e1000: Avoid signed shifts while assembling PHY IDs 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 2a21a77a21134bcefeb35fc4d4b32532369ca65f Auto-Submitted: auto-generated Date: Tue, 25 Aug 2026 00:31:52 +0000 Message-Id: <6a8ce278.3e6b7.4f9124db@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2a21a77a21134bcefeb35fc4d4b32532369ca65f commit 2a21a77a21134bcefeb35fc4d4b32532369ca65f Author: Kevin Bowling AuthorDate: 2026-08-11 19:40:48 +0000 Commit: Kevin Bowling CommitDate: 2026-08-25 00:30:36 +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. (cherry picked from commit 13a7470096567480676e24545b3c1d6404f3f2ec) --- 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)