Biao Huang f4c7d8948e net: stmmac: fix unbalanced ptp clock issue in suspend/resume flow
Current stmmac driver will prepare/enable ptp_ref clock in
stmmac_init_tstamp_counter().

The stmmac_pltfr_noirq_suspend will disable it once in suspend flow.

But in resume flow,
	stmmac_pltfr_noirq_resume --> stmmac_init_tstamp_counter
	stmmac_resume --> stmmac_hw_setup --> stmmac_init_ptp --> stmmac_init_tstamp_counter
ptp_ref clock reference counter increases twice, which leads to unbalance
ptp clock when resume back.

Move ptp_ref clock prepare/enable out of stmmac_init_tstamp_counter to fix it.

Fixes: 0735e639f129d ("net: stmmac: skip only stmmac_ptp_register when resume from suspend")
Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-15 12:06:56 +01:00
..
2022-06-30 08:21:43 +09:00
2022-06-26 14:12:56 -07:00
2022-05-15 18:31:28 -06:00
2022-06-28 17:56:57 +02:00
2022-07-04 10:41:59 -07:00
2022-06-07 15:00:29 -07:00
2022-06-02 15:23:54 -07:00
2022-06-02 15:23:54 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-05-23 21:06:11 -07:00
2022-05-19 16:56:17 +02:00
2022-06-29 09:32:06 -07:00
2022-05-09 23:09:10 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-07-01 11:19:14 -07:00
2022-06-03 11:48:47 -07:00
2022-05-11 08:29:11 +03:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00