The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bbdd3c4692e2869817f77c359b4a2719e716921d
commit bbdd3c4692e2869817f77c359b4a2719e716921d Author: Kevin Bowling <[email protected]> AuthorDate: 2026-08-11 19:34:50 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-08-11 20:59:33 +0000 ixgbe: Avoid signed overflow in LED register masks LED index three shifts the blink bit into bit 31. Convert the base to the register width before shifting so the operation is unsigned. This is the ixgbe counterpart of the e1000 correction imported from DPDK commit 214cb0d7f1. MFC after: 2 weeks --- sys/dev/ixgbe/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 4986673b65c4..9222d8d54fd0 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -2228,7 +2228,7 @@ enum { #define IXGBE_LED_IVRT_BASE 0x00000040 #define IXGBE_LED_BLINK_BASE 0x00000080 #define IXGBE_LED_MODE_MASK_BASE 0x0000000F -#define IXGBE_LED_OFFSET(_base, _i) (_base << (8 * (_i))) +#define IXGBE_LED_OFFSET(_base, _i) ((u32)(_base) << (8 * (_i))) #define IXGBE_LED_MODE_SHIFT(_i) (8*(_i)) #define IXGBE_LED_IVRT(_i) IXGBE_LED_OFFSET(IXGBE_LED_IVRT_BASE, _i) #define IXGBE_LED_BLINK(_i) IXGBE_LED_OFFSET(IXGBE_LED_BLINK_BASE, _i)
