Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>
To: Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com
Cc: netdev@vger.kernel.org, Konrad Knitter <konrad.knitter@intel.com>
Subject: Re: [PATCH iwl-net v2 2/3] ice: fix autoneg disable when link partner doesn't support AN
Date: Thu, 17 Sep 2026 11:22:11 +0200	[thread overview]
Message-ID: <7df5cf3e-b4f7-407f-8da4-c0abdc7752ce@linux.intel.com> (raw)
In-Reply-To: <20260915125529.3975723-3-aleksandr.loktionov@intel.com>



On 15.09.2026 14:55, Aleksandr Loktionov wrote:

> +static bool ice_autoneg_disable_allowed(struct ice_port_info *p)
> +{
> +	u8 an_info = p->phy.link_info.an_info;
> +
> +	if (an_info & ICE_AQ_AN_COMPLETED)
> +		return true;
> +	/* ICE_AQ_LP_AN_ABILITY is only valid when link is up */
> +	return (p->phy.link_info.link_info & ICE_AQ_LINK_UP) &&
> +	       !(an_info & ICE_AQ_LP_AN_ABILITY);

When link is down and AN hasn't completed, this still silently no-ops the disable request (unchanged from before). Worth confirming that's the intended UX, or returning -EINVAL here too.

> +}
> +
>  /**
>   * ice_setup_autoneg
>   * @p: port info
> @@ -2539,8 +2561,8 @@ ice_setup_autoneg(struct ice_port_info *p, struct ethtool_link_ksettings *ks,
>  			}
>  		}
>  	} else {
> -		/* If autoneg is currently enabled */
> -		if (p->phy.link_info.an_info & ICE_AQ_AN_COMPLETED) {
> +		/* If autoneg completed or link partner does not support AN */
> +		if (ice_autoneg_disable_allowed(p)) {
>  			/* If autoneg is supported 10GBASE_T is the only PHY
>  			 * that can disable it, so otherwise return error
>  			 */

Thanks,
Tomasz

  parent reply	other threads:[~2026-09-17  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 12:55 [PATCH iwl-net v2 0/3] ice: fixes for pause reporting, autoneg and RDMA Aleksandr Loktionov
2026-09-15 12:55 ` [PATCH iwl-net v2 1/3] ice: fix asymmetric pause negotiation reporting in ethtool Aleksandr Loktionov
2026-09-16 14:05   ` Simon Horman
2026-09-15 12:55 ` [PATCH iwl-net v2 2/3] ice: fix autoneg disable when link partner doesn't support AN Aleksandr Loktionov
2026-09-16 14:06   ` Simon Horman
2026-09-17  9:22   ` Tomasz Lichwala [this message]
2026-09-15 12:55 ` [PATCH iwl-net v2 3/3] ice: support RDMA on 4+-port E830 devices Aleksandr Loktionov
2026-09-16 14:03   ` Simon Horman
2026-09-17  9:35   ` Tomasz Lichwala

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=7df5cf3e-b4f7-407f-8da4-c0abdc7752ce@linux.intel.com \
    --to=tomasz.lichwala@linux.intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=konrad.knitter@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