git: 2f2829310aba - stable/15 - ixgbe: Avoid signed overflow in LED register masks

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 25 Aug 2026 00:31:46 UTC
The branch stable/15 has been updated by kbowling:

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

commit 2f2829310aba4530abbcc3e3f9f519fdb86b456c
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-11 19:34:50 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-25 00:29:36 +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.
    
    (cherry picked from commit bbdd3c4692e2869817f77c359b4a2719e716921d)
---
 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 4c146aadc581..85190dc59fdb 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)