public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: Petr Oros <poros@redhat.com>, netdev@vger.kernel.org
Cc: 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>,
	Simon Horman <horms@kernel.org>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH iwl-net v5] ice: fix missing dpll notifications for SW pins
Date: Tue, 14 Apr 2026 21:16:37 +0200	[thread overview]
Message-ID: <68b5cc9d-81d2-4ff5-9d3e-a6d6746dcb3e@redhat.com> (raw)
In-Reply-To: <20260409102501.1447628-1-poros@redhat.com>

On 4/9/26 12:25, Petr Oros wrote:
> ---
>   drivers/net/ethernet/intel/ice/ice_dpll.c | 74 +++++++++++++++++++----
>   1 file changed, 63 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
> index 3f8cd5b8298b57..d817f17dcf1951 100644
> --- a/drivers/net/ethernet/intel/ice/ice_dpll.c
> +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
> @@ -1154,6 +1154,30 @@ ice_dpll_input_state_get(const struct dpll_pin *pin, void *pin_priv,
>   				      extack, ICE_DPLL_PIN_TYPE_INPUT);
>   }
>   
> +/**
> + * ice_dpll_sw_pin_notify_peer - notify the paired SW pin after a state change
> + * @d: pointer to dplls struct
> + * @changed: the SW pin that was explicitly changed (already notified by dpll core)
> + *
> + * SMA and U.FL pins share physical signal paths in pairs (SMA1/U.FL1 and
> + * SMA2/U.FL2).  When one pin's routing changes via the PCA9575 GPIO
> + * expander, the paired pin's state may also change.  Send a change
> + * notification for the peer pin so userspace consumers monitoring the
> + * peer via dpll netlink learn about the update.
> + *
> + * Context: Can be called under pf->dplls.lock, dpll_pin_change_ntf() is safe.
> + */
> +static void ice_dpll_sw_pin_notify_peer(struct ice_dplls *d,
> +					struct ice_dpll_pin *changed)
> +{
> +	struct ice_dpll_pin *peer;
> +
> +	peer = (changed >= d->sma && changed < d->sma + ICE_DPLL_PIN_SW_NUM) ?
> +		&d->ufl[changed->idx] : &d->sma[changed->idx];
> +	if (peer->pin)
> +		dpll_pin_change_ntf(peer->pin);
> +}
> +
>   /**
>    * ice_dpll_sma_direction_set - set direction of SMA pin
>    * @p: pointer to a pin
> @@ -1233,6 +1257,8 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p,
>   			ret = ice_dpll_pin_state_update(p->pf, target,
>   							type, extack);
>   	}
> +	if (!ret)
> +		ice_dpll_sw_pin_notify_peer(d, p);
>   
>   	return ret;
>   }

ice_dpll_sma_direction_set() runs to process a DPLL_CMD_PIN_SET command 
from userspace. It runs with dpll_lock held - taken in dpll_pin_pre_doit().
ice_dpll_sw_pin_notify_peer() -> dpll_pin_change_ntf() will take 
dpll_lock again and deadlock.

Michal


  reply	other threads:[~2026-04-14 19:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 10:25 [PATCH iwl-net v5] ice: fix missing dpll notifications for SW pins Petr Oros
2026-04-14 19:16 ` Michal Schmidt [this message]
2026-04-14 20:46   ` [Intel-wired-lan] " Jacob Keller
2026-04-15  9:04     ` Ivan Vecera

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=68b5cc9d-81d2-4ff5-9d3e-a6d6746dcb3e@redhat.com \
    --to=mschmidt@redhat.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=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.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