Re: [Intel-wired-lan] [PATCH iwl-net] ice: Fix "Unknown bps" during link events

Simon Horman <[email protected]> Tue, 28 Jul 2026 11:55:11 +0100
Newsgroups org.osuosl.intel-wired-lan,org.kernel.vger.netdev
Message-ID <[email protected]>
On Wed, Jul 22, 2026 at 02:24:48PM +0200, Lukasz Czapnik wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c

...

> @@ -1193,8 +1194,10 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
>  	/* Check if the link state is up after updating link info, and treat
>  	 * this event as an UP event since the link is actually UP now.
>  	 */
> -	if (phy_info->link_info.link_info & ICE_AQ_LINK_UP)
> +	if (phy_info->link_info.link_info & ICE_AQ_LINK_UP) {
>  		link_up = true;
> +		link_speed = phy_info->link_info.link_speed;
> +	}
>  
>  	vsi = ice_get_main_vsi(pf);
>  	if (!vsi || !vsi->port_info)

I have a minor concern that the change above effects the following,
which is a little further down in the same function.

	/* if the old link up/down and speed is the same as the new */
	if (link_up == old_link && link_speed == old_link_speed)
		return 0;

Maybe it's obvious why that isn't the case.
But if so, perhaps could be mentioned in the patch description anyway?

> @@ -1224,7 +1227,7 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
>  			ice_set_dflt_mib(pf);
>  	}
>  	ice_vsi_link_event(vsi, link_up);
> -	ice_print_link_msg(vsi, link_up);
> +	ice_print_link_msg(vsi, link_up, link_speed);
>  
>  	ice_vc_notify_link_state(pf);
>  

...