From: Paolo Abeni <pabeni@redhat.com>
To: Ivan Vecera <ivecera@redhat.com>, netdev@vger.kernel.org
Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Petr Oros <poros@redhat.com>,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Richard Cochran <richardcochran@gmail.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] dpll: use pin owner's dpll ref for pin-level attribute setting
Date: Thu, 6 Aug 2026 11:41:19 +0200 [thread overview]
Message-ID: <8b498be8-8b5b-49b0-b20b-71ca8cc277cf@redhat.com> (raw)
In-Reply-To: <20260803120245.56046-3-ivecera@redhat.com>
On 8/3/26 2:02 PM, Ivan Vecera wrote:
> Pin-level attributes (frequency, phase adjust, embedded sync, reference
> sync) are properties of the pin itself, not of a particular DPLL device.
> The get callbacks already use only the pin owner's DPLL reference
> (via dpll_pin_own_dpll_ref_first()), but the set callbacks iterate over
> all registered DPLL references and invoke the set operation on each one.
>
> This is redundant because a pin is a single physical entity — setting
> its frequency or phase adjust once through the owner's ops is sufficient.
> Calling set on every registered DPLL just results in duplicate HW writes
> for drivers that share a pin across multiple DPLL devices (e.g. ice
> registers each input pin with both the EEC and PPS DPLL, zl3073x
> registers input pins with every DPLL channel).
>
> Simplify dpll_pin_freq_set(), dpll_pin_esync_set(),
> dpll_pin_ref_sync_state_set() and dpll_pin_phase_adj_set() to call the
> set callback only through the owner's DPLL reference, matching the
> existing get-side behavior. This removes the xa_for_each iteration
> loops, the now-unnecessary rollback logic, and several local variables.
>
> The -EOPNOTSUPP validation loop, which checked ops support across all
> owner-matching references, is replaced with a direct check on the
> single owner reference returned by dpll_pin_own_dpll_ref_first().
>
> The documentation in dpll.rst is updated to reflect that pin-level
> attributes are set through the pin owner's dpll reference only.
>
> No existing driver is affected:
> - ptp_ocp and mlx5 register each pin with a single DPLL.
> - ice registers input pins with two DPLLs (EEC and PPS) using
> identical ops and pin_priv; the set callbacks address the HW by
> pin index, not by DPLL, so the second call was a no-op.
> - zl3073x registers input pins with every DPLL channel; the set
> callbacks address HW by pin/ref ID regardless of DPLL. The
> ref_sync_set callback was the only one with per-channel behavior,
> addressed by the preceding patch.
>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
> Documentation/driver-api/dpll.rst | 10 +-
> drivers/dpll/dpll_netlink.c | 213 +++++++-----------------------
> 2 files changed, 55 insertions(+), 168 deletions(-)
>
> diff --git a/Documentation/driver-api/dpll.rst b/Documentation/driver-api/dpll.rst
> index f83150917814e2..6fb50e53475c09 100644
> --- a/Documentation/driver-api/dpll.rst
> +++ b/Documentation/driver-api/dpll.rst
> @@ -116,8 +116,8 @@ Shared pins
> A single pin object can be attached to multiple dpll devices.
> Then there are two groups of configuration knobs:
>
> -1) Set on a pin - the configuration affects all dpll devices pin is
> - registered to (i.e., ``DPLL_A_PIN_FREQUENCY``),
> +1) Set on a pin - the configuration is performed through the pin owner's
> + dpll reference only (i.e., ``DPLL_A_PIN_FREQUENCY``),
I find the new text confusing; it seems to me that the pin configuration
now affects a single DPLL.
Sashiko nipa has several comments, please have a look:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803120245.56046-1-ivecera%40redhat.com
and also please be aware of net-next commit c82ff94592fb.
/P
/P
next prev parent reply other threads:[~2026-08-06 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 12:02 [PATCH net-next v2 0/2] dpll: use pin owner's dpll ref for pin-level set callbacks Ivan Vecera
2026-08-03 12:02 ` [PATCH net-next v2 1/2] dpll: zl3073x: update all DPLL channels on ref_sync_set Ivan Vecera
2026-08-06 13:07 ` Ivan Vecera
2026-08-03 12:02 ` [PATCH net-next v2 2/2] dpll: use pin owner's dpll ref for pin-level attribute setting Ivan Vecera
2026-08-06 9:41 ` Paolo Abeni [this message]
2026-08-06 13:11 ` 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=8b498be8-8b5b-49b0-b20b-71ca8cc277cf@redhat.com \
--to=pabeni@redhat.com \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=poros@redhat.com \
--cc=richardcochran@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=vadim.fedorenko@linux.dev \
/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