]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit469c09b132bc5787512495177b64bad386fdad38
tree8f03f6855719c17bde09bdca734e738b8428f79f
parent35b4561867f5e0af1a567082b2f8763e99badbd0
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