Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

From
Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date
2020-07-30 19:44:41
Reply to
Richard Cochran, 2020-07-30
On Thu, Jul 30, 2020 at 12:32:45PM -0700, Richard Cochran wrote:
On Thu, Jul 30, 2020 at 07:38:00PM +0100, Russell King - ARM Linux admin wrote:
quoted
What I ended up doing was:

        if (ops->get_ts_info) {
                ret = ops->get_ts_info(dev, info);
                if (ret != -EOPNOTSUPP)
                        return ret;
        }
        if (phy_has_tsinfo(phydev))
                return phy_ts_info(phydev, info);
...

which gives the MAC first refusal.  If the MAC wishes to defer to
phylib or the default, it can just return -EOPNOTSUPP.
I guess that makes sense.  If someone designs a board that happens to
have a PHY with unwanted time stamping fcunctionality, then at least
the MAC time stamping function will work.  If the designers really
want PHY time stamping, then they are likely to have to patch the MAC
driver in any case.

So I'm not against such a change.  It would be important to keep the
current "PHY-friendly" MAC drivers still friendly, and so they would
need patching as part of the change.
That would only be necessary if they also provide the get_ts_info
method.

So, I guess I need to find all drivers that refer to phylink or phylib
functions, that also implement get_ts_info method and review them.
I would expect that to be very small, since there's currently little
point implementing PTP at both the PHY and the MAC for the reason I've
raised earlier in this thread.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Thread (74 messages) 74 messages, 9 authors, last reply 2023-04-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help