On Wed, Jul 29, 2020 at 06:19:32AM -0700, Richard Cochran wrote: > On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - ARM Linux admin > wrote: > > How do we deal with this situation - from what I can see from the > > ethtool API, we have to make a choice about which to use. How do we > > make that choice? > > Unfortunately the stack does not implement simultaneous MAC + PHY time > stamping. If your board has both, then you make the choice to use the > PHY by selecting NETWORK_PHY_TIMESTAMPING at kernel compile time.
Which is more or less what I said in my email. However, the important question about how to select between the two, which is really what I'm after, has not been addressed. > (Also some MAC drivers do not defer to the PHY properly. Sometimes > you can work around that by de-selecting the MAC's PTP function in the > Kconfig if possible, but otherwise you need to patch the MAC driver.) ... which really doesn't work if you have a board where only some network interfaces have a PHY with PTP support, but all have PTP support in the MAC. If all MACs or the majority of MACs use a common PTP clock, it seems to me that you would want to use the MACs rather than the PHY, especially if the PHY doesn't offer as good a quality PTP clock as is available from the MAC. Randomly patching the kernel is out of the question, for arm based systems we want one kernel that works correctly across as many platforms as possible, and Kconfig choices to set platform specific details are basically unacceptable, let alone patching the kernel to make those decisions. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!