linux/drivers/net/ethernet
Joakim Zhang 276aae3772 net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume
commit 5f58591323 ("net: stmmac: delete the eee_ctrl_timer after
napi disabled"), this patch tries to fix system hang caused by eee_ctrl_timer,
unfortunately, it only can resolve it for system reboot stress test. System
hang also can be reproduced easily during system suspend/resume stess test
when mount NFS on i.MX8MP EVK board.

In stmmac driver, eee feature is combined to phylink framework. When do
system suspend, phylink_stop() would queue delayed work, it invokes
stmmac_mac_link_down(), where to deactivate eee_ctrl_timer synchronizly.
In above commit, try to fix issue by deactivating eee_ctrl_timer obviously,
but it is not enough. Looking into eee_ctrl_timer expire callback
stmmac_eee_ctrl_timer(), it could enable hareware eee mode again. What is
unexpected is that LPI interrupt (MAC_Interrupt_Enable.LPIEN bit) is always
asserted. This interrupt has chance to be issued when LPI state entry/exit
from the MAC, and at that time, clock could have been already disabled.
The result is that system hang when driver try to touch register from
interrupt handler.

The reason why above commit can fix system hang issue in stmmac_release()
is that, deactivate eee_ctrl_timer not just after napi disabled, further
after irq freed.

In conclusion, hardware would generate LPI interrupt when clock has been
disabled during suspend or resume, since hardware is in eee mode and LPI
interrupt enabled.

Interrupts from MAC, MTL and DMA level are enabled and never been disabled
when system suspend, so postpone clocks management from suspend stage to
noirq suspend stage should be more safe.

Fixes: 5f58591323 ("net: stmmac: delete the eee_ctrl_timer after napi disabled")
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-08 12:28:26 +01:00
..
3com net: 3com: 3c59x: clean up inconsistent indenting 2021-09-03 11:51:26 +01:00
8390 ne2000: fix unused function warning 2021-09-08 11:45:06 +01:00
actions net: ethernet: actions: Add helper dependency on COMPILE_TEST 2021-08-25 12:06:53 +01:00
adaptec dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
aeroflex
agere dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
alacritech
allwinner dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
alteon
altera
amazon ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
amd ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
apm xgene-v2: Fix a resource leak in the error handling path of 'xge_probe()' 2021-08-23 11:23:48 +01:00
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-31 09:06:04 -07:00
arc dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
atheros dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
broadcom bnxt_en: Fix possible unintended driver initiated error recovery 2021-09-05 20:43:04 +01:00
brocade ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
calxeda
cavium ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
chelsio cxgb3: fix oops on module removal 2021-09-07 10:00:07 +01:00
cirrus net: cs89x0: disable compile testing on powerpc 2021-09-03 13:42:27 +01:00
cisco ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
cortina ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
davicom dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
dec tulip: Remove deadcode on startup true condition 2021-08-07 09:39:54 +01:00
dlink dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
emulex ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
ezchip
faraday dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
freescale dpaa2-eth: Replace strlcpy with strscpy 2021-08-31 11:30:53 +01:00
fujitsu
google gve: fix the wrong AdminQ buffer overflow check 2021-07-16 10:41:40 -07:00
hisilicon net: hns3: make hclgevf_cmd_caps_bit_map0 and hclge_cmd_caps_bit_map0 static 2021-09-06 13:13:40 +01:00
huawei ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
i825xx Networking stragglers and fixes for 5.15-rc1, including changes from netfilter, 2021-09-07 14:02:58 -07:00
ibm ibmvnic: check failover_pending in login response 2021-09-08 11:29:49 +01:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-31 09:06:04 -07:00
litex net: Add depends on OF_NET for LiteX's LiteETH 2021-08-31 08:36:38 -07:00
marvell octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()' 2021-09-04 13:07:00 +01:00
mediatek dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
mellanox net/mlx5e: Fix condition when retrieving PTP-rqn 2021-09-07 14:17:02 -07:00
micrel dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
microchip net: sparx5: switchdev: adding frame DMA functionality 2021-08-20 14:28:55 +01:00
microsoft net: mana: Add WARN_ON_ONCE in case of CQE read overflow 2021-08-25 11:06:54 +01:00
moxa net: moxa: fix UAF in moxart_mac_probe 2021-07-09 11:01:01 -07:00
mscc net: mscc: ocelot: use helpers for port VLAN membership 2021-08-20 14:39:52 +01:00
myricom ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
natsemi Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-05 15:08:47 -07:00
netronome ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
ni net/mlxbf_gige: Make use of devm_platform_ioremap_resourcexxx() 2021-08-31 12:08:05 +01:00
nvidia forcedeth: switch from 'pci_' to 'dma_' API 2021-08-23 11:56:57 +01:00
nxp dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
oki-semi net: pch_gbe: remove mii_ethtool_gset() error handling 2021-08-19 13:06:53 +01:00
packetengines dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
pasemi net: pasemi: Remove usage of the deprecated "pci-dma-compat.h" API 2021-08-30 20:30:51 -07:00
pensando ionic: fix a sleeping in atomic bug 2021-09-03 16:16:51 -07:00
qlogic Networking stragglers and fixes for 5.15-rc1, including changes from netfilter, 2021-09-07 14:02:58 -07:00
qualcomm net: qcom/emac: Replace strlcpy with strscpy 2021-09-06 16:43:17 +01:00
rdc dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
realtek r8169: add rtl_enable_exit_l1 2021-08-26 12:05:43 +01:00
renesas net: renesas: sh_eth: Fix freeing wrong tx descriptor 2021-09-07 14:02:02 +01:00
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-13 06:41:22 -07:00
samsung ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
seeq
sfc ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
sgi dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
silan
sis Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
smsc drivers: net: smc911x: clean up inconsistent indenting 2021-09-03 11:51:26 +01:00
socionext ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
stmicro net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume 2021-09-08 12:28:26 +01:00
sun niu: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
synopsys ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
tehuti ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
ti ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
toshiba net: spider_net: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
tundra dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
via ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
wiznet net: w5100: check return value after calling platform_get_resource() 2021-08-31 12:08:42 +01:00
xilinx ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
xircom dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
xscale net: ixp46x: Remove duplicate include of module.h 2021-09-01 11:40:22 +01:00
dnet.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
dnet.h
ec_bhf.c net: ec_bhf: switch from 'pci_' to 'dma_' API 2021-08-23 11:56:57 +01:00
ethoc.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
fealnx.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
jme.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
jme.h
Kconfig net: Add driver for LiteX's LiteETH network interface 2021-08-26 12:13:52 +01:00
korina.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
lantiq_etop.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
lantiq_xrx200.c
Makefile net: Add driver for LiteX's LiteETH network interface 2021-08-26 12:13:52 +01:00