提交 c2b6cdee 编写于 作者: Y Yoshihiro Shimoda 提交者: David S. Miller

net: ravb: Fix lack of register setting after system resumed for Gen3

After system entered Suspend to RAM, registers setting of this
hardware is reset because the SoC will be turned off. On R-Car Gen3
(info->ccc_gac), ravb_ptp_init() is called in ravb_probe() only. So,
after system resumed, it lacks of the initial settings for ptp. So,
add ravb_ptp_{init,stop}() into ravb_{resume,suspend}().

Fixes: f5d7837f ("ravb: ptp: Add CONFIG mode support")
Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f2b0b521
...@@ -2973,6 +2973,9 @@ static int __maybe_unused ravb_suspend(struct device *dev) ...@@ -2973,6 +2973,9 @@ static int __maybe_unused ravb_suspend(struct device *dev)
else else
ret = ravb_close(ndev); ret = ravb_close(ndev);
if (priv->info->ccc_gac)
ravb_ptp_stop(ndev);
return ret; return ret;
} }
...@@ -3011,6 +3014,9 @@ static int __maybe_unused ravb_resume(struct device *dev) ...@@ -3011,6 +3014,9 @@ static int __maybe_unused ravb_resume(struct device *dev)
/* Restore descriptor base address table */ /* Restore descriptor base address table */
ravb_write(ndev, priv->desc_bat_dma, DBAT); ravb_write(ndev, priv->desc_bat_dma, DBAT);
if (priv->info->ccc_gac)
ravb_ptp_init(ndev, priv->pdev);
if (netif_running(ndev)) { if (netif_running(ndev)) {
if (priv->wol_enabled) { if (priv->wol_enabled) {
ret = ravb_wol_restore(ndev); ret = ravb_wol_restore(ndev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册