From: Kazuya Mizuguchi <kazuya.mizuguchi...@renesas.com> This patch fixes the problem that ptp4l command does not work after suspend and resume. Add the initial setting in ravb_suspend() and ravb_resume(), because ptp does not work.
Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi...@renesas.com> Signed-off-by: Simon Horman <horms+rene...@verge.net.au> --- drivers/net/ethernet/renesas/ravb_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index b311b1ac1286..dbde3d11458b 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2295,6 +2295,9 @@ static int __maybe_unused ravb_suspend(struct device *dev) else ret = ravb_close(ndev); + if (priv->chip_id != RCAR_GEN2) + ravb_ptp_stop(ndev); + return ret; } @@ -2302,6 +2305,7 @@ static int __maybe_unused ravb_resume(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct ravb_private *priv = netdev_priv(ndev); + struct platform_device *pdev = priv->pdev; int ret = 0; /* If WoL is enabled set reset mode to rearm the WoL logic */ @@ -2330,6 +2334,9 @@ static int __maybe_unused ravb_resume(struct device *dev) /* Restore descriptor base address table */ ravb_write(ndev, priv->desc_bat_dma, DBAT); + if (priv->chip_id != RCAR_GEN2) + ravb_ptp_init(ndev, pdev); + if (netif_running(ndev)) { if (priv->wol_enabled) { ret = ravb_wol_restore(ndev); -- 2.11.0