From: Simon Horman <horms@kernel.org>
To: Ivan Vecera <ivecera@redhat.com>
Cc: netdev@vger.kernel.org, pabeni@redhat.com,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>, Petr Oros <poros@redhat.com>,
Jakub Kicinski <kuba@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] dpll: zl3073x: Fix ref frequency setting
Date: Tue, 17 Feb 2026 16:20:08 +0000 [thread overview]
Message-ID: <aZSVOPmEGy31iDxd@horms.kernel.org> (raw)
In-Reply-To: <20260216194007.680416-1-ivecera@redhat.com>
On Mon, Feb 16, 2026 at 08:40:07PM +0100, Ivan Vecera wrote:
> The frequency for an input reference is computed as:
>
> frequency = freq_base * freq_mult * freq_ratio_m / freq_ratio_n
>
> Before commit 5bc02b190a3fb ("dpll: zl3073x: Cache all reference
> properties in zl3073x_ref"), zl3073x_dpll_input_pin_frequency_set()
> explicitly wrote 1 to both the REF_RATIO_M and REF_RATIO_N hardware
> registers whenever a new frequency was set. This ensured the FEC ratio
> was always reset to 1:1 alongside the new base/multiplier values.
>
> The refactoring in that commit introduced zl3073x_ref_freq_set() to
> update the cached ref state, but this helper only sets freq_base and
> freq_mult without resetting freq_ratio_m and freq_ratio_n to 1. Because
> zl3073x_ref_state_set() uses a compare-and-write strategy, unchanged
> ratio fields are never written to the hardware. If the device previously
> had non-unity FEC ratio values, they remain in effect after a frequency
> change, resulting in an incorrect computed frequency.
>
> Explicitly set freq_ratio_m and freq_ratio_n to 1 in zl3073x_ref_freq_set()
> to restore the original behavior.
>
> Fixes: 5bc02b190a3fb ("dpll: zl3073x: Cache all reference properties in zl3073x_ref")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-02-17 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 19:40 [PATCH net] dpll: zl3073x: Fix ref frequency setting Ivan Vecera
2026-02-17 16:20 ` Simon Horman [this message]
2026-02-18 1:20 ` 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=aZSVOPmEGy31iDxd@horms.kernel.org \
--to=horms@kernel.org \
--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=pabeni@redhat.com \
--cc=poros@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.