> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Alok Tiwari
> Sent: Sunday, August 10, 2025 7:01 PM
> To: Nguyen, Anthony L <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> Cc: [email protected]; [email protected]
> Subject: [Intel-wired-lan] [PATCH net] ixgbe: fix incorrect map used
> in eee linkmode
> 
> incorrectly used ixgbe_lp_map in loops intended to populate the
> supported and advertised EEE linkmode bitmaps based on ixgbe_ls_map.
> This results in incorrect bit setting and potential out-of-bounds
I think s/incorrect bit setting/incorrect bit settings/ (plural)
Everything else if fine.
Reviewed-by: Aleksandr Loktionov <[email protected]>

> access, since ixgbe_lp_map and ixgbe_ls_map have different sizes
> and purposes.
> 
> ixgbe_lp_map[i] -> ixgbe_ls_map[i]
> 
> Use ixgbe_ls_map for supported and advertised linkmodes, and keep
> ixgbe_lp_map usage only for link partner (lp_advertised) mapping.
> 
> Fixes: 9356b6db9d05 ("net: ethernet: ixgbe: Convert EEE to use
> linkmodes")
> Signed-off-by: Alok Tiwari <[email protected]>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> index 25c3a09ad7f1..1a2f1bdb91aa 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> @@ -3571,13 +3571,13 @@ ixgbe_get_eee_fw(struct ixgbe_adapter
> *adapter, struct ethtool_keee *edata)
> 
>       for (i = 0; i < ARRAY_SIZE(ixgbe_ls_map); ++i) {
>               if (hw->phy.eee_speeds_supported &
> ixgbe_ls_map[i].mac_speed)
> -                     linkmode_set_bit(ixgbe_lp_map[i].link_mode,
> +                     linkmode_set_bit(ixgbe_ls_map[i].link_mode,
>                                        edata->supported);
>       }
> 
>       for (i = 0; i < ARRAY_SIZE(ixgbe_ls_map); ++i) {
>               if (hw->phy.eee_speeds_advertised &
> ixgbe_ls_map[i].mac_speed)
> -                     linkmode_set_bit(ixgbe_lp_map[i].link_mode,
> +                     linkmode_set_bit(ixgbe_ls_map[i].link_mode,
>                                        edata->advertised);
>       }
> 
> --
> 2.47.1

Reply via email to