Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Karol Kolacinski <karol.kolacinski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH 8/9] ice: restore timestamp configuration after reset
Date: Fri, 27 Oct 2023 16:50:36 -0700	[thread overview]
Message-ID: <b557b5a5-72e2-481c-951b-f983868ae763@intel.com> (raw)
In-Reply-To: <20230807103624.468230-9-karol.kolacinski@intel.com>



On 8/7/2023 3:36 AM, Karol Kolacinski wrote:
> The driver calls ice_ptp_cfg_timestamp() during
> ice_ptp_prepare_for_reset() to disable timestamping while the device is
> resetting. It then attempts to restore timestamp configuration at the
> end of ice_rebuild(). However, it currently forcibly calls
> ice_ptp_cfg_timestamp() with a value of true when the device is not E810
> and is the clock owner, while calling ice_ptp_cfg_timestamp() with a
> value of false for all other devices.
> 
> This incorrectly forcibly disables timestamping on all ports except the
> clock owner.
> 
> This was not detected previously due to a quirk of the LinuxPTP ptp4l
> application. If ptp4l detects a missing timestamp, it enters a fault
> state and performs recovery logic which includes executing SIOCSHWTSTAMP
> again, restoring the now accidentally cleared configuration.
> 
> Not every application does this, and for these applications, timestamps
> will mysteriously stop after a PF reset, without being restored until an
> application restart.
> 
> Fix this by replacing ice_ptp_cfg_timestamp() with two new functions:
> 
> 1) ice_ptp_disable_timestamp_mode() which unconditionally disables the
>    timestamping logic in ice_ptp_prepare_for_reset() and
>    ice_ptp_release()
> 
> 2) ice_ptp_restore_timestamp_mode() which calls
>    ice_ptp_restore_tx_interrupt() to restore Tx timestamping
>    configuration, calls ice_set_rx_tstamp() to restore Rx timestamping
>    configuration, and issues an immediate TSYN_TX interrupt to ensure
>    that timestamps which may have occurred during the device reset get
>    processed.
> 
> This obsoletes the ice_set_tx_tstamp() function which can now be safely
> removed.
> 
> With this change, all devices should now restore Tx and Rx timestamping
> functionality correctly after a PF reset without application
> intervention.
> 
> Change-type: DefectResolution
> HSDES-number: 22018443364
> HSDES-tenant: server_platf_lan.bug
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---

I'm sending a version of this patch directly to net-next along with the
related fix for PFINT_TSYN_MSK, so that may cause a conflict with this
series. I think it should be fixable by Tony or myself when we rebase
IWL, but it could lead to needing a new version of the series.

Thanks,
Jake
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-10-27 23:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 10:36 [Intel-wired-lan] [PATCH 0/9] ice: fix timestamping in reset process Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 1/9] ice: use ice_pf_src_tmr_owned where available Karol Kolacinski
2023-08-07 10:59   ` Przemek Kitszel
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 2/9] ice: introduce PTP state machine Karol Kolacinski
2023-08-07 11:12   ` Przemek Kitszel
2023-08-07 17:32     ` Jacob Keller
2023-08-08  8:47       ` Przemek Kitszel
2023-08-17 14:04     ` Kolacinski, Karol
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 3/9] ice: pass reset type to PTP reset functions Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 4/9] ice: rename PTP functions and fields Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 5/9] ice: factor out ice_ptp_rebuild_owner() Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 6/9] ice: remove ptp_tx ring parameter flag Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 7/9] ice: modify tstamp_config only during TS mode set Karol Kolacinski
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 8/9] ice: restore timestamp configuration after reset Karol Kolacinski
2023-10-27 23:50   ` Jacob Keller [this message]
2023-08-07 10:36 ` [Intel-wired-lan] [PATCH 9/9] ice: stop destroying and reinitalizing Tx tracker during reset Karol Kolacinski
2023-08-07 12:20   ` Przemek Kitszel

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=b557b5a5-72e2-481c-951b-f983868ae763@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=karol.kolacinski@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