The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f5fd839fe688181e57171850ce51e4dec71e62fd
commit f5fd839fe688181e57171850ce51e4dec71e62fd Author: Kevin Bowling <[email protected]> AuthorDate: 2026-08-11 19:40:56 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-08-11 20:59:33 +0000 igc: 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 --- sys/dev/igc/igc_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/igc/igc_phy.c b/sys/dev/igc/igc_phy.c index 24ecefb2c625..fffdfad3b237 100644 --- a/sys/dev/igc/igc_phy.c +++ b/sys/dev/igc/igc_phy.c @@ -143,7 +143,7 @@ s32 igc_get_phy_id(struct igc_hw *hw) if (ret_val) return ret_val; - phy->id = (u32)(phy_id << 16); + phy->id = (u32)phy_id << 16; usec_delay(200); ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); if (ret_val)
