OSDN Git Service

net: fec: fix system hang during suspend/resume
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 14 Dec 2021 10:50:46 +0000 (18:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Dec 2021 10:30:25 +0000 (10:30 +0000)
commit0b6f65c707e5ec5e33916820e2a4a628e2b4576c
tree8f03f6855719c17bde09bdca734e738b8428f79f
parent843869951258f38dc3d9702a19df7c4c79911aee
net: fec: fix system hang during suspend/resume

1. During normal suspend (WoL not enabled) process, system has posibility
to hang. The root cause is TXF interrupt coming after clocks disabled,
system hang when accessing registers from interrupt handler. To fix this
issue, disable all interrupts when system suspend.

2. System also has posibility to hang with WoL enabled during suspend,
after entering stop mode, then magic pattern coming after clocks
disabled, system will be waked up, and interrupt handler will be called,
system hang when access registers. To fix this issue, disable wakeup
irq in .suspend(), and enable it in .resume().

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c