Skip to contentSkip to conversation

net: stmmac: add separate warning for PTP not being supported by HW

PATCH Applied Heiner Kallweit 2 participants 2 messages Feb 1, 2017 – Feb 3, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: add separate warning for PTP not being supported by HW

Chips like Amlogic S905GXBB are supported by this driver but don't have support for PTP. Add a separate warning for missing HW support to differentiate it from other actual failures.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 -2
index 26a2185f..bd83bf9e 100644
@@ -1726,8 +1726,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
 
 	if (init_ptp) {
 		ret = stmmac_init_ptp(priv);
-		if (ret)
-			netdev_warn(priv->dev, "fail to init PTP.\n");
+		if (ret == -EOPNOTSUPP)
+			netdev_warn(priv->dev, "PTP not supported by HW\n");
+		else if (ret)
+			netdev_warn(priv->dev, "PTP init failed\n");
 	}
 
 #ifdef CONFIG_DEBUG_FS
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Wed, 1 Feb 2017 22:02:02 +0100

Quoted 5 lines

Chips like Amlogic S905GXBB are supported by this driver but don't have support for PTP. Add a separate warning for missing HW support to differentiate it from other actual failures.

Applied to net-netxt.