* [PATCH] net: stmmac: add separate warning for PTP not being supported by HW
@ 2017-02-01 21:02 Heiner Kallweit
2017-02-03 3:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2017-02-01 21:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, linux-amlogic
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.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 26a2185f..bd83bf9e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: stmmac: add separate warning for PTP not being supported by HW
2017-02-01 21:02 [PATCH] net: stmmac: add separate warning for PTP not being supported by HW Heiner Kallweit
@ 2017-02-03 3:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-03 3:01 UTC (permalink / raw)
To: hkallweit1; +Cc: netdev, linux-amlogic
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Wed, 1 Feb 2017 22:02:02 +0100
> 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.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied to net-netxt.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-03 3:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-01 21:02 [PATCH] net: stmmac: add separate warning for PTP not being supported by HW Heiner Kallweit
2017-02-03 3:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).