1
0
Fork 0

net: systemport: Avoid RBUF stuck in Wake-on-LAN mode

[ Upstream commit 263a425a48 ]

After a number of suspend and resume cycles, it is possible for the RBUF
to be stuck in Wake-on-LAN mode, despite the MPD enable bit being
cleared which instructed the RBUF to exit that mode.

Avoid creating that problematic condition by clearing the RX_EN and
TX_EN bits in the UniMAC prior to disable the Magic Packet Detector
logic which is guaranteed to make the RBUF exit Wake-on-LAN mode.

Fixes: 83e82f4c70 ("net: systemport: add Wake-on-LAN support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Florian Fainelli 2020-02-05 12:32:04 -08:00 committed by Greg Kroah-Hartman
parent 8526c3b6e7
commit 74888191bb
1 changed files with 3 additions and 0 deletions

View File

@ -2728,6 +2728,9 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
umac_reset(priv);
/* Disable the UniMAC RX/TX */
umac_enable_set(priv, CMD_RX_EN | CMD_TX_EN, 0);
/* We may have been suspended and never received a WOL event that
* would turn off MPD detection, take care of that now
*/