netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: yangbo.lu@nxp.com, davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net] ptp_qoriq: Don't write system time into PHC at boot
Date: Mon, 30 Sep 2019 19:37:42 -0700	[thread overview]
Message-ID: <20191001023742.GE1497@localhost> (raw)
In-Reply-To: <20190928222228.27493-1-olteanv@gmail.com>

On Sun, Sep 29, 2019 at 01:22:28AM +0300, Vladimir Oltean wrote:
> But I couldn't find a justification to just move the spin_lock_init a
> few lines above, because I don't see why the ptp_qoriq_settime call
> should be done at all at probe time. Writing a CLOCK_REALTIME value into
> a timer that is supposed to track CLOCK_TAI means there will be a 37
> second offset that's going to render it useless for any practical
> purpose.

Rhetorical question:  Is off-by-37 more wrong than 1970?

Some PHC drivers start counting from zero (1970), and some from the
system time (which might be any value at all).  It really doesn't
matter what the initial value is, IMHO, because it will always be
wrong.

> So just remove the ptp_qoriq_settime call and let the clock tick in 1970
> until user space does something about it. Most other PTP drivers do the
> same, except chelsio cxgb4 and maybe a few others.

Not sure about "most".

Please fix the actual bug, the spin lock issue, and don't worry about
changing the initial value.

Thanks,
Richard



      parent reply	other threads:[~2019-10-01  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-28 22:22 [PATCH net] ptp_qoriq: Don't write system time into PHC at boot Vladimir Oltean
2019-10-01  0:24 ` David Miller
2019-10-01  2:37 ` Richard Cochran [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=20191001023742.GE1497@localhost \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=yangbo.lu@nxp.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).