diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 19:41:07 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 20:59:34 +0000 |
| commit | f4bf1da7bac80cbe3ec862f395c22a3c5d176312 (patch) | |
| tree | 4e0729e54412a0fa22eb0e32c5fe75ba9e581639 | |
| parent | f5fd839fe688181e57171850ce51e4dec71e62fd (diff) | |
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.
MFC after: 2 weeks
| -rw-r--r-- | sys/dev/ixgbe/ixgbe_phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
