All of lore.kernel.org
 help / color / mirror / Atom feed
From: "naamax.meir" <naamax.meir@linux.intel.com>
To: aravindhan.gunasekaran@intel.com, intel-wired-lan@osuosl.org
Cc: anthony.l.nguyen@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] igc: Handle PPS start time programming for past time values
Date: Sun, 2 Jul 2023 09:27:38 +0300	[thread overview]
Message-ID: <8376b338-647b-4e1f-46b7-e9bc3868f08e@linux.intel.com> (raw)
In-Reply-To: <20230615063043.48250-1-aravindhan.gunasekaran@intel.com>

On 6/15/2023 09:30, aravindhan.gunasekaran@intel.com wrote:
> From: Aravindhan Gunasekaran <aravindhan.gunasekaran@intel.com>
> 
> I225/6 hardware can be programmed to start PPS output once
> the time in Target Time registers is reached. The time
> programmed in these registers should always be into future.
> Only then PPS output is triggered when SYSTIM register
> reaches the programmed value. There are two modes in i225/6
> hardware to program PPS, pulse and clock mode.
> 
> There were issues reported where PPS is not generated when
> start time is in past.
> 
> Example 1, "echo 0 0 0 2 0 > /sys/class/ptp/ptp0/period"
> 
> In the current implementation, a value of '0' is programmed
> into Target time registers and PPS output is in pulse mode.
> Eventually an interrupt which is triggered upon SYSTIM
> register reaching Target time is not fired. Thus no PPS
> output is generated.
> 
> Example 2, "echo 0 0 0 1 0 > /sys/class/ptp/ptp0/period"
> 
> Above case, a value of '0' is programmed into Target time
> registers and PPS output is in clock mode. Here, HW tries to
> catch-up the current time by incrementing Target Time
> register. This catch-up time seem to vary according to
> programmed PPS period time as per the HW design. In my
> experiments, the delay ranged between few tens of seconds to
> few minutes. The PPS output is only generated after the
> Target time register reaches current time.
> 
> In my experiments, I also observed PPS stopped working with
> below test and could not recover until module is removed and
> loaded again.
> 
> 1) echo 0 <future time> 0 1 0 > /sys/class/ptp/ptp1/period
> 2) echo 0 0 0 1 0 > /sys/class/ptp/ptp1/period
> 3) echo 0 0 0 1 0 > /sys/class/ptp/ptp1/period
> 
> After this PPS did not work even if i re-program with proper
> values. I could only get this back working by reloading the
> driver.
> 
> This patch takes care of calculating and programming
> appropriate future time value into Target Time registers.
> 
> Fixes: 5e91c72e560c ("igc: Fix PPS delta between two synchronized end-points")
> Signed-off-by: Aravindhan Gunasekaran <aravindhan.gunasekaran@intel.com>
> ---
> v2: Added Fixes tag
> ---
>   drivers/net/ethernet/intel/igc/igc_ptp.c | 25 +++++++++++++++++++++---
>   1 file changed, 22 insertions(+), 3 deletions(-)

Tested-by: Naama Meir <naamax.meir@linux.intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      parent reply	other threads:[~2023-07-02  6:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  6:30 [Intel-wired-lan] [PATCH iwl-net v2] igc: Handle PPS start time programming for past time values aravindhan.gunasekaran
2023-06-15 11:22 ` Zulkifli, Muhammad Husaini
2023-07-02  6:27 ` naamax.meir [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=8376b338-647b-4e1f-46b7-e9bc3868f08e@linux.intel.com \
    --to=naamax.meir@linux.intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=aravindhan.gunasekaran@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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.