From: "Fine, Gil" <gil.fine@linux.intel.com>
To: Vitaly Lifshits <vitaly.lifshits@intel.com>, intel-wired-lan@osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13
Date: Tue, 17 Jun 2025 16:01:48 +0300 [thread overview]
Message-ID: <e02c9f2f-9643-428b-a6aa-71fbdf790169@linux.intel.com> (raw)
In-Reply-To: <20250525083843.287228-1-vitaly.lifshits@intel.com>
On 5/25/2025 11:38, Vitaly Lifshits wrote:
> On some systems with Nahum 11 and Nahum 13 the value of the XTAL clock in
> the software STRAP is incorrect. This causes the PTP timer to run at the
> wrong rate and can lead to synchronization issues.
>
> The STRAP value is configured by the system firmware, and a firmware
> update is not always possible. Since the XTAL clock on these systems
> always runs at 38.4MHz, the driver may ignore the STRAP and just set
> the correct value.
>
> Fixes: cc23f4f0b6b9 ("e1000e: Add support for Meteor Lake")
> Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Reviewed-by: Gil Fine <gil.fine@linux.intel.com>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 14 +++++++++++---
> drivers/net/ethernet/intel/e1000e/ptp.c | 9 ++++++---
> 2 files changed, 17 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 8ebcb6a7d608..9d2098ed4969 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -3534,9 +3534,6 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
> case e1000_pch_cnp:
> case e1000_pch_tgp:
> case e1000_pch_adp:
> - case e1000_pch_mtp:
> - case e1000_pch_lnp:
> - case e1000_pch_ptp:
> case e1000_pch_nvp:
> if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
> /* Stable 24MHz frequency */
> @@ -3552,6 +3549,17 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
> adapter->cc.shift = shift;
> }
> break;
> + case e1000_pch_mtp:
> + case e1000_pch_lnp:
> + case e1000_pch_ptp:
> + /* System firmware can misreport this value, so set it to a
> + * stable 38400KHz frequency.
> + */
> + incperiod = INCPERIOD_38400KHZ;
> + incvalue = INCVALUE_38400KHZ;
> + shift = INCVALUE_SHIFT_38400KHZ;
> + adapter->cc.shift = shift;
> + break;
> case e1000_82574:
> case e1000_82583:
> /* Stable 25MHz frequency */
> diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c b/drivers/net/ethernet/intel/e1000e/ptp.c
> index 89d57dd911dc..992aec8a4538 100644
> --- a/drivers/net/ethernet/intel/e1000e/ptp.c
> +++ b/drivers/net/ethernet/intel/e1000e/ptp.c
> @@ -295,15 +295,18 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
> case e1000_pch_cnp:
> case e1000_pch_tgp:
> case e1000_pch_adp:
> - case e1000_pch_mtp:
> - case e1000_pch_lnp:
> - case e1000_pch_ptp:
> case e1000_pch_nvp:
> if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)
> adapter->ptp_clock_info.max_adj = MAX_PPB_24MHZ;
> else
> adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
> break;
> + case e1000_pch_mtp:
> + case e1000_pch_lnp:
> + case e1000_pch_ptp:
> + adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
> + break;
> +
> case e1000_82574:
> case e1000_82583:
> adapter->ptp_clock_info.max_adj = MAX_PPB_25MHZ;
prev parent reply other threads:[~2025-06-17 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-25 8:38 [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13 Vitaly Lifshits
2025-06-12 13:06 ` Mor Bar-Gabay
2025-06-17 13:01 ` Fine, Gil [this message]
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=e02c9f2f-9643-428b-a6aa-71fbdf790169@linux.intel.com \
--to=gil.fine@linux.intel.com \
--cc=intel-wired-lan@osuosl.org \
--cc=vitaly.lifshits@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 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.