git: b5f46655e0ce - stable/15 - ixgbe: Avoid a signed shift while assembling the PHY ID
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Aug 2026 00:31:54 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=b5f46655e0cebb41d67178398707cebf338060ed
commit b5f46655e0cebb41d67178398707cebf338060ed
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-11 19:41:07 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-25 00:30:56 +0000
ixgbe: Avoid a signed shift while assembling the PHY ID
The PHY identifier word is promoted to signed int when the cast is
applied after the shift. Cast the 16-bit register value first so
identifiers with their high bit set are assembled as unsigned data.
(cherry picked from commit f4bf1da7bac80cbe3ec862f395c22a3c5d176312)
---
sys/dev/ixgbe/ixgbe_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c
index 4913afd4e6d5..4200d0cd7f68 100644
--- a/sys/dev/ixgbe/ixgbe_phy.c
+++ b/sys/dev/ixgbe/ixgbe_phy.c
@@ -434,7 +434,7 @@ s32 ixgbe_get_phy_id(struct ixgbe_hw *hw)
&phy_id_high);
if (status == IXGBE_SUCCESS) {
- hw->phy.id = (u32)(phy_id_high << 16);
+ hw->phy.id = (u32)phy_id_high << 16;
status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_ID_LOW,
IXGBE_MDIO_PMA_PMD_DEV_TYPE,
&phy_id_low);