All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Michael Walle <michael@walle.cc>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [RFC PATCH v2 0/2] AT8031 PHY timestamping support
Date: Fri, 28 Feb 2020 10:15:07 -0800	[thread overview]
Message-ID: <20200228181507.GA4744@localhost> (raw)
In-Reply-To: <20200228180226.22986-1-michael@walle.cc>

On Fri, Feb 28, 2020 at 07:02:24PM +0100, Michael Walle wrote:
>  (1) The PHY doesn't support atomic reading of the (timestamp,
>      messageType, sequenceId) tuple. The workaround is to read the
>      timestamp again and check if it has changed. Actually, you'd have
>      to read the complete tuple again.

This HW is broken by design :(

> But if you're using a P2P clock with peer delay requests this whole
> thing falls apart because of caveat (3). You'll often see messages like
>   received SYNC without timestamp
> or
>  received PDELAY_RESP without timestamp
> in linuxptp. Sometimes it working for some time and then it starts to
> loosing packets. I suspect this depends on how the PDELAY messages are
> interleaved with the SYNC message. If there is not enough time to until
> the next event message is received either of these two messages won't
> have a timestamp.

And even the case where a Sync and a DelayResp arrive at nearly the
same time will fail.

> The PHY also supports appending the timestamp to the actual ethernet frame,
> but this seems to only work when the PHY is connected via RGMII. I've never
> get it to work with a SGMII connection.

This is the way to go.  I would try to get the vendor's help in making
this work.

Thanks,
Richard

  parent reply	other threads:[~2020-02-28 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 18:02 [RFC PATCH v2 0/2] AT8031 PHY timestamping support Michael Walle
2020-02-28 18:02 ` [RFC PATCH v2 1/2] net: phy: let the driver register its own IRQ handler Michael Walle
2020-02-28 18:02 ` [RFC PATCH v2 2/2] net: phy: at803x: add PTP support for AR8031 Michael Walle
2020-03-01 12:22   ` Richard Cochran
2020-02-28 18:15 ` Richard Cochran [this message]
2020-02-28 19:43   ` [RFC PATCH v2 0/2] AT8031 PHY timestamping support Michael Walle
2020-02-29 14:48     ` Richard Cochran

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=20200228181507.GA4744@localhost \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.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.