net: stmmac: skip only stmmac_ptp_register when resume from suspend
authorMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Wed, 26 Jan 2022 09:47:23 +0000 (17:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:25:38 +0000 (17:25 +0100)
commitba7c71a777c10a7ffee121e097ccd46096a76155
tree7aee59d89bec4ebe02e4e6ed1388a20b91d823ce
parent11191406f2f18982f703d1b0676569ce7377d24f
net: stmmac: skip only stmmac_ptp_register when resume from suspend

commit 0735e639f129dff455aeb91da291f5c578cc33db upstream.

When resume from suspend, besides skipping PTP registration, it also
skipping PTP HW initialization. This could cause PTP clock not able to
operate properly when resume from suspend.

To fix this, only stmmac_ptp_register() is skipped when resume from
suspend.

Fixes: fe1319291150 ("stmmac: Don't init ptp again when resume from suspend/hibernation")
Cc: <stable@vger.kernel.org> # 5.15.x
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c