The branch main has been updated by kbowling:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f4bf1da7bac80cbe3ec862f395c22a3c5d176312

commit f4bf1da7bac80cbe3ec862f395c22a3c5d176312
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-11 19:41:07 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-11 20:59:34 +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.
    
    MFC after:      2 weeks
---
 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);

Reply via email to