public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	"Aleksandr Loktionov" <aleksandr.loktionov@intel.com>,
	Simon Horman <horms@kernel.org>, Jiri Pirko <jiri@resnulli.us>
Cc: <netdev@vger.kernel.org>, Petr Oros <poros@redhat.com>,
	Alexander Nowlin <alexander.nowlin@intel.com>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Subject: Re: [PATCH net 11/11] ice: add dpll peer notification for paired SMA and U.FL pins
Date: Wed, 29 Apr 2026 16:28:48 -0700	[thread overview]
Message-ID: <3c1f1894-e969-4dc2-914f-9e15db35dab5@intel.com> (raw)
In-Reply-To: <20260427-jk-iwl-net-petr-oros-fixes-v1-11-cdcb48303fd8@intel.com>

On 4/27/2026 10:22 PM, Jacob Keller wrote:
> From: Petr Oros <poros@redhat.com>
> 
> SMA and U.FL pins share physical signal paths in pairs (SMA1/U.FL1 and
> SMA2/U.FL2).  When one pin's state changes via a PCA9575 GPIO write,
> the paired pin's state also changes, but no notification is sent for
> the peer pin.  Userspace consumers monitoring the peer via dpll netlink
> subscribe never learn about the update.
> 
> Add ice_dpll_sw_pin_notify_peer() which sends a change notification for
> the paired SW pin.  Call it from ice_dpll_pin_sma_direction_set(),
> ice_dpll_sma_pin_state_set(), and ice_dpll_ufl_pin_state_set() after
> pf->dplls.lock is released.  Use __dpll_pin_change_ntf() because
> dpll_lock is still held by the dpll netlink layer (dpll_pin_pre_doit).
> 
> Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
> Signed-off-by: Petr Oros <poros@redhat.com>
> Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
> Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---

Sashiko.dev says the following:

> commit f5e294c42ef0c3cf4bca4497a268b68f562bce96
> Author: Petr Oros <poros@redhat.com>
> ice: add dpll peer notification for paired SMA and U.FL pins
> SMA and U.FL pins share physical signal paths in pairs. This patch adds
> ice_dpll_sw_pin_notify_peer() to send a change notification for the
> paired SW pin when its state changes.
>> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
>> --- a/drivers/net/ethernet/intel/ice/ice_dpll.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
> [ ... ]
>> @@ -1344,6 +1370,8 @@ ice_dpll_ufl_pin_state_set(const struct dpll_pin *pin, void *pin_priv,
>>  
>>  unlock:
>>  	mutex_unlock(&pf->dplls.lock);
>> +	if (!ret)
>> +		ice_dpll_sw_pin_notify_peer(&pf->dplls, p);
> Could the hardware routing state become permanently out of sync with the
> userspace view if an error occurs here?
> While this patch doesn't introduce the underlying behavior, if enabling or
> disabling the backing CGU pin via ice_dpll_pin_enable() or
> ice_dpll_pin_disable() fails earlier in this function, an error is returned
> without rolling back the successful SMA control register write in
> ice_write_sma_ctrl().
> Since ret is non-zero on this error path, the ice_dpll_sw_pin_notify_peer()
> call is skipped, and the DPLL netlink core suppresses the change notification
> for the original pin.
> Does this leave the hardware state irreversibly altered while userspace
> receives an error, assumes no change occurred, and receives no notifications?
> This same question applies to ice_dpll_sma_pin_state_set() below.
>>  
This reads to me like there is a possible issue in the existing code
which is separate from the issues this tries to address.

It looks like ice_dpll_pin_enable() can fail if the associated AdminQ
command fails. If we want to cleanly handle this, we likely need
unrolling logic which I think is an independent fix from anything in
this series.

I'm not sure what that unrolling logic would look like though. Maybe we
just need to undo the ice_write_sma_ctrl? But that also looks like an
AdminQ command we have to send.

I'm not sure how careful we need to be here in this flow.

Either way, to my eyes this looks like a pre-existing issue that may
need some attention but I don't feel like it should block these fixes.

Thanks,
Jake

  reply	other threads:[~2026-04-29 23:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  5:22 [PATCH net 00/11] Intel Wired LAN Update 2026-04-27 (ice, iavf) Jacob Keller
2026-04-28  5:22 ` [PATCH net 01/11] iavf: rename IAVF_VLAN_IS_NEW to IAVF_VLAN_ADDING Jacob Keller
2026-04-28  5:22 ` [PATCH net 02/11] iavf: stop removing VLAN filters from PF on interface down Jacob Keller
2026-04-28  5:22 ` [PATCH net 03/11] iavf: wait for PF confirmation before removing VLAN filters Jacob Keller
2026-04-28  5:22 ` [PATCH net 04/11] iavf: add VIRTCHNL_OP_ADD_VLAN to success completion handler Jacob Keller
2026-04-28  5:22 ` [PATCH net 05/11] ice: fix NULL pointer dereference in ice_reset_all_vfs() Jacob Keller
2026-04-28  5:22 ` [PATCH net 06/11] ice: fix infinite recursion in ice_cfg_tx_topo via ice_init_dev_hw Jacob Keller
2026-04-28  5:22 ` [PATCH net 07/11] ice: fix missing SMA pin initialization in DPLL subsystem Jacob Keller
2026-04-28  5:22 ` [PATCH net 08/11] ice: fix SMA and U.FL pin state changes affecting paired pin Jacob Keller
2026-04-28  5:22 ` [PATCH net 09/11] dpll: export __dpll_pin_change_ntf() for use under dpll_lock Jacob Keller
2026-04-28  5:22 ` [PATCH net 10/11] ice: fix missing dpll notifications for SW pins Jacob Keller
2026-04-28  5:22 ` [PATCH net 11/11] ice: add dpll peer notification for paired SMA and U.FL pins Jacob Keller
2026-04-29 23:28   ` Jacob Keller [this message]
2026-04-30  0:41     ` Jakub Kicinski
2026-04-30  9:36       ` Paolo Abeni
2026-04-30 10:00 ` [PATCH net 00/11] Intel Wired LAN Update 2026-04-27 (ice, iavf) patchwork-bot+netdevbpf

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=3c1f1894-e969-4dc2-914f-9e15db35dab5@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=alexander.nowlin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /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