net: stmmac: delete the eee_ctrl_timer after napi disabled
authorFugang Duan <fugang.duan@nxp.com>
Mon, 7 Dec 2020 10:51:40 +0000 (18:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:45 +0000 (13:46 +0100)
commit6ccb22ebd1976d2d68b21285600f033d96626728
treee6b152fb984a6c884daa57c595ff1e53cd337a5b
parent371bf703e3922ab467c5ae7b7b8767144318e7a4
net: stmmac: delete the eee_ctrl_timer after napi disabled

[ Upstream commit 5f58591323bf3f342920179f24515935c4b5fd60 ]

There have chance to re-enable the eee_ctrl_timer and fire the timer
in napi callback after delete the timer in .stmmac_release(), which
introduces to access eee registers in the timer function after clocks
are disabled then causes system hang. Found this issue when do
suspend/resume and reboot stress test.

It is safe to delete the timer after napi disabled and disable lpi mode.

Fixes: d765955d2ae0b ("stmmac: add the Energy Efficient Ethernet support")
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.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