Skip to content

Commit c2b6cde

Browse files
shimodaydavem330
authored andcommitted
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: f5d7837 ("ravb: ptp: Add CONFIG mode support") Signed-off-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f2b0b52 commit c2b6cde

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2973,6 +2973,9 @@ static int __maybe_unused ravb_suspend(struct device *dev)
29732973
else
29742974
ret = ravb_close(ndev);
29752975

2976+
if (priv->info->ccc_gac)
2977+
ravb_ptp_stop(ndev);
2978+
29762979
return ret;
29772980
}
29782981

@@ -3011,6 +3014,9 @@ static int __maybe_unused ravb_resume(struct device *dev)
30113014
/* Restore descriptor base address table */
30123015
ravb_write(ndev, priv->desc_bat_dma, DBAT);
30133016

3017+
if (priv->info->ccc_gac)
3018+
ravb_ptp_init(ndev, priv->pdev);
3019+
30143020
if (netif_running(ndev)) {
30153021
if (priv->wol_enabled) {
30163022
ret = ravb_wol_restore(ndev);

0 commit comments

Comments
 (0)