diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 19:34:40 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 20:59:33 +0000 |
| commit | baa6e3af8525244e65a404fa13306fbca7feae9c (patch) | |
| tree | 3e4d91ffba99d24d8c3c8cb9b0da9b4fd313b68f /sys/dev | |
| parent | 1121aaa0758baf04bed6f16d4157116b49c25000 (diff) | |
ixgbe: Avoid a signed shift while assembling the PBA number
The EEPROM word is promoted to signed int before the left shift when
the cast is applied to the complete expression. Cast the word first so
all 16-bit values are shifted as unsigned data.
This is the ixgbe counterpart of the e1000 correction imported from
DPDK commit b932270c66.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ixgbe/ixgbe_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 458452a8492e..2b9bd2da403c 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -770,7 +770,7 @@ s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num) DEBUGOUT("NVM Not supported\n"); return IXGBE_NOT_IMPLEMENTED; } - *pba_num = (u32)(data << 16); + *pba_num = (u32)data << 16; ret_val = hw->eeprom.ops.read(hw, IXGBE_PBANUM1_PTR, &data); if (ret_val) { |
