net: stmmac: Silence PTP init errors on hw without PTP
authorHans de Goede <hdegoede@redhat.com>
Sun, 26 Jan 2014 14:50:43 +0000 (15:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jan 2014 06:40:44 +0000 (22:40 -0800)
Logging a PTP error on hw which simply does not support PTP is not very
useful. Moreover this message gets logged on every if-up, and if there is
no cable inserted NetworkManager will re-try the ifup every 50 seconds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index d93aa87..a395bb2 100644 (file)
@@ -1635,7 +1635,7 @@ static int stmmac_hw_setup(struct net_device *dev)
        stmmac_mmc_setup(priv);
 
        ret = stmmac_init_ptp(priv);
-       if (ret)
+       if (ret && ret != -EOPNOTSUPP)
                pr_warn("%s: failed PTP initialisation\n", __func__);
 
 #ifdef CONFIG_STMMAC_DEBUG_FS