[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181007212118.GE25883@lunn.ch>
Date: Sun, 7 Oct 2018 23:21:18 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
David Miller <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Mark Rutland <mark.rutland@....com>,
Miroslav Lichvar <mlichvar@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping
interface.
On Sun, Oct 07, 2018 at 02:07:28PM -0700, Richard Cochran wrote:
> On Sun, Oct 07, 2018 at 01:59:06PM -0700, Richard Cochran wrote:
> > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote:
> > > 1) phylink, not phdev. We have been pushing some MAC drivers towards
> > > phylink, especially those which support >1Gbp.
> >
> > If a phylink device appears that wants time stamping, can't we add the
> > call to register_mii_timestamper()?
>
> Actually, I see that 'struct phylink' has a 'struct phy_device *phydev',
> and so it can implement the 'struct mii_timestamper' interface directly.
Maybe. But you still don't have skb->dev->phydev. And phylink->phydev
is much more dynamic, since it can be hot-{un}plugged. You need to
handle it going away at any time.
However, your timestamper is unlikely to be hot-{un}pluggable. So
skb->dev->mii_timestamper seems a lot safer.
Andrew
Powered by blists - more mailing lists