Thread (21 messages) 21 messages, 3 authors, 2023-08-01

Re: [PATCH v8 net-next 12/12] net: remove phy_has_hwtstamp() -> phy_mii_ioctl() decision from converted drivers

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2023-07-18 14:38:38
Also in: lkml, netdev

On Mon, Jul 17, 2023 at 06:27:09PM +0300, Vladimir Oltean wrote:
+static int dev_set_hwtstamp_phylib(struct net_device *dev,
+				   struct kernel_hwtstamp_config *cfg,
+				   struct netlink_ext_ack *extack)
+{
+	const struct net_device_ops *ops = dev->netdev_ops;
+	bool phy_ts = phy_has_hwtstamp(dev->phydev);
+	struct kernel_hwtstamp_config old_cfg = {};
+	bool changed = false;
+	int err;
+
+	cfg->source = phy_ts ? HWTSTAMP_SOURCE_PHYLIB : HWTSTAMP_SOURCE_NETDEV;
+
+	if (!phy_ts || (dev->priv_flags & IFF_SEE_ALL_HWTSTAMP_REQUESTS)) {
I suppose the idea here is that for something like mvpp2, which when we
have PTP support for Marvell PHYs in general will want to prefer to use
the MAC-based PTP rather than PHY-based, that driver needs to set
IFF_SEE_ALL_HWTSTAMP_REQUESTS so that the ndo timestamp ops always get
called? I didn't see this discussed in the commit message for this
patch.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help