Re: [PATCH net-next] net: ethtool: allow MAC drivers to override ethtool get_ts_info
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-01-14 17:31:57
On Thu, Jan 14, 2021 at 09:27:12AM -0800, Richard Cochran wrote:
On Thu, Jan 14, 2021 at 01:32:35PM +0000, Russell King - ARM Linux admin wrote:quoted
quoted
We had already discussed this patch last year, and you agreed with it then. What has changed?See the discussion in this sub-thread: https://lore.kernel.org/netdev/20200729105807.GZ1551@shell.armlinux.org.uk/ (local)Thanks for the reminder. We ended up with having to review the MAC drivers that support phydev. https://lore.kernel.org/netdev/20200730194427.GE1551@shell.armlinux.org.uk/ (local) There is at least the FEC that supports phydev. I have a board that combines the FEC with the dp83640 PHYTER, and your patch would break this setup. (In the case of this HW combination, the PHYTER is superior in every way.) Another combination that I have seen twice is the TI am335x with its cpsw MAC and the PHYTER. Unfortunately I don't have one of these boards, but people made them because the cpsw MAC supports time stamping in a way that is inadequate. I *think* the cpsw/phyter combination would work with your patch, but only if the users disable CONFIG_TI_CPTS at compile time.
I think then the only solution is to move the decision how to handle get_ts_info into each MAC driver and get rid of: if (phy_has_tsinfo(phydev)) return phy_ts_info(phydev, info); in __ethtool_get_ts_info(). -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!