]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Dec 2020 22:52:29 +0000 (14:52 -0800)
commitcfdaddd672ada3eb72c4a15babe7be4e1e05f454
treef3834bde53b04112b9bdc5443571bfa6f1a6f23b
parent57565da0872e8adecf0a3482dc11bbd10aefa8cf
net: stmmac: delete the eee_ctrl_timer after napi disabled

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: 6d1634718fa8d ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c