linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Bryan.Whitehead@microchip.com
Cc: UNGLinuxDriver@microchiptechnology.mail.onmicrosoft.com,
	David Miller <davem@davemloft.net>,
	YueHaibing <yuehaibing@huawei.com>,
	Networking <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64
Date: Wed, 15 Aug 2018 22:33:01 +0200	[thread overview]
Message-ID: <CAK8P3a0f38ev5E4Zvg_3BS+1UN2NzYSw+dyRHXDwLCWgREXJ6g@mail.gmail.com> (raw)
In-Reply-To: <90A7E81AE28BAE4CBDDB3B35F187D2644073E9C4@CHN-SV-EXMX02.mchp-main.com>

On Wed, Aug 15, 2018 at 8:03 PM <Bryan.Whitehead@microchip.com> wrote:
>
> >
> > Question: this is the only ptp driver that sets the hardware time to the
> > current system time in TAI. Why does it do that?
>
> This is done when the driver starts up after reset. Otherwise the clock is off by 48 years.
> It seemed to me that the system time was the most appropriate clock to sync to.
> If my reasoning is incorrect, please enlighten me.

I've never worked with PTP, but my understanding from looking at the other
drivers is that the time normally gets set either from another host through the
PTP protocol, or using clock_settime() from user space with the current time.

       Arnd

  reply	other threads:[~2018-08-15 20:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 17:49 [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64 Arnd Bergmann
2018-08-15 18:03 ` Bryan.Whitehead
2018-08-15 20:33   ` Arnd Bergmann [this message]
2018-08-15 20:41     ` Bryan.Whitehead
2018-08-15 20:44       ` Arnd Bergmann
2018-08-15 20:50         ` Bryan.Whitehead
2018-08-17 16:25           ` Richard Cochran
2018-08-17 19:29             ` Arnd Bergmann
2018-08-18  0:09               ` Richard Cochran
2018-08-19 17:58 ` David Miller

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=CAK8P3a0f38ev5E4Zvg_3BS+1UN2NzYSw+dyRHXDwLCWgREXJ6g@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=Bryan.Whitehead@microchip.com \
    --cc=UNGLinuxDriver@microchiptechnology.mail.onmicrosoft.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).