[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <57926B53-BB8B-4A9B-9340-0DFFDA4452BA@flugsvamp.com>
Date: Mon, 30 May 2022 18:15:44 -0700
From: Flugsvamp <jlemon@...gsvamp.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: Jonathan Lemon <jonathan.lemon@...il.com>, netdev@...r.kernel.org,
f.fainelli@...il.com, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, bcm-kernel-feedback-list@...adcom.com,
kernel-team@...com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com
Subject: Re: [PATCH net-next v5 2/2] net: phy: broadcom: Add PTP support for some Broadcom PHYs.
> On May 30, 2022, at 4:04 PM, Richard Cochran <richardcochran@...il.com> wrote:
>
> On Mon, May 30, 2022 at 10:07:44AM -0700, Jonathan Lemon wrote:
>>> On Sat, May 28, 2022 at 05:34:47PM -0700, Richard Cochran wrote:
>>>> On Wed, May 18, 2022 at 03:39:35PM -0700, Jonathan Lemon wrote:
>>>
>>>> +static int bcm_ptp_adjtime_locked(struct bcm_ptp_private *priv,
>>>> + s64 delta_ns)
>>>> +{
>>>> + struct timespec64 ts;
>>>> + int err;
>>>> +
>>>> + err = bcm_ptp_gettime_locked(priv, &ts, NULL);
>>>> + if (!err) {
>>>> + set_normalized_timespec64(&ts, ts.tv_sec,
>>>> + ts.tv_nsec + delta_ns);
>>>
>>> This also takes a LONG time when delta is large...
>>
>> Didn't we just go through this? What constitutes a "large" offset here?
>> The current version seems acceptable to me:
>
> When the PHY boots, it starts from time zero.
>
> Then as a client it needs to adjust to today, something like:
>
> 1653951762.413809006 or Mon May 30 16:02:42 2022
>
> (that means adding 1,653,951,762,413,809,006 nanoseconds)
>
> Try that and see how long it takes to apply the adjustment.
That’s certainly a big adjustment. I was expecting something along the lines of a settime() call, followed up by adjtime().
Will fix. Seems like there should be a better call sequence for this, though.
Sent from my iPhone
Powered by blists - more mailing lists