public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>, Jan Glaza <jan.glaza@intel.com>
Subject: Re: [PATCH iwl-net 6/10] ice: check PHY autoneg capability before rejecting ethtool autoneg setting
Date: Fri, 10 Apr 2026 11:58:20 -0700	[thread overview]
Message-ID: <6f0231dd-e648-4836-b3cd-76c49cfaa999@intel.com> (raw)
In-Reply-To: <20260403054029.3789616-7-aleksandr.loktionov@intel.com>



On 4/2/2026 10:40 PM, Aleksandr Loktionov wrote:
> ice_set_link_ksettings() rejects autoneg requests by comparing
> user settings against safe_ks which is populated by
> ice_phy_type_to_ethtool(). The Autoneg bit in safe_ks is set
> only if the current PHY configuration reports it supported,
> but this misses PHYs that support autoneg and have it available
> through PHY capabilities. Pull the autoneg flag from the actual
> PHY capabilities (already fetched earlier in the function) to
> ensure the user can toggle autoneg on any capable PHY.
> 
> Fixes: 5cd349c349d6 ("ice: report supported and advertised autoneg using PHY capabilities")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jan Glaza <jan.glaza@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index 49b9376..44483bc 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -2654,6 +2654,14 @@ ice_set_link_ksettings(struct net_device *netdev,
>   	/* Get link modes supported by hardware.*/
>   	ice_phy_type_to_ethtool(netdev, &safe_ks);
>   
> +	/* Pull the value of autoneg from phy caps to ensure we allow
> +	 * toggling it on all PHYs that support it.
> +	 */
> +	if (ice_is_phy_caps_an_enabled(phy_caps)) {
> +		ethtool_link_ksettings_add_link_mode(&safe_ks, supported, Autoneg);
> +		set_bit(ETHTOOL_LINK_MODE_FEC_NONE_BIT, safe_ks.link_modes.supported);

 From Sashiko:

This isn't a bug, but should this use 
ethtool_link_ksettings_add_link_mode() instead of calling set_bit() 
directly? Using set_bit() on the link modes breaks the ethtool interface 
abstraction.

Also, does this incorrectly couple the ETHTOOL_LINK_MODE_FEC_NONE_BIT 
support with Autonegotiation support? Forward Error Correction support 
is independent of Autonegotiation.

For PHYs lacking Autonegotiation, the FEC none bit will not be added to 
safe_ks.link_modes.supported. When a user requests settings via ethtool, 
copy_ks.link_modes.advertising will likely contain the FEC none bit 
since it is unconditionally returned by ice_get_link_ksettings().

> +	}
> +
>   	/* and check against modes requested by user.
>   	 * Return an error if unsupported mode was set.
>   	 */


  reply	other threads:[~2026-04-10 18:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03  5:40 [PATCH iwl-net 0/10] ice: bug fixes -- no link, tc-flower, VF rate Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 1/10] ice: fix mirroring to VSI list Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 2/10] ice: update FW on all DCB changes Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 3/10] ice: disallow service task to run while driver is unloading Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 4/10] ice: error out on CONNECTED state for input pin Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 5/10] ice: add 10000baseCR_Full to advertised link speed map Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 6/10] ice: check PHY autoneg capability before rejecting ethtool autoneg setting Aleksandr Loktionov
2026-04-10 18:58   ` Tony Nguyen [this message]
2026-04-03  5:40 ` [PATCH iwl-net 7/10] ice: fix missing 50G single-lane ethtool link speed mappings Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 8/10] ice: set ETS TLV willing bit in default MIB sent to firmware Aleksandr Loktionov
2026-04-06 20:22   ` Ertman, David M
2026-04-03  5:40 ` [PATCH iwl-net 9/10] ice: select inner TCP dummy packet when matching on ip_proto TCP without explicit L4 field Aleksandr Loktionov
2026-04-03  5:40 ` [PATCH iwl-net 10/10] ice: allow setting min_tx_rate to 0 to resolve VF bandwidth oversubscription Aleksandr Loktionov
2026-04-10 18:58   ` Tony Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f0231dd-e648-4836-b3cd-76c49cfaa999@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jan.glaza@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox