net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 5 Feb 2020 20:32:04 +0000 (12:32 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:31:06 +0000 (16:31 -0500)
commit34b4e7bdf5165a2839ad85e7ec4a890847d486e0
treedfa31efa0e524e91c0149fce40bb3abbc8e86d57
parente989b25125db249bccffc9904f07a3a4a6533797
net: systemport: Avoid RBUF stuck in Wake-on-LAN mode

[ Upstream commit 263a425a482fc495d6d3f9a29b9103a664c38b69 ]

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: 83e82f4c706b ("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>
drivers/net/ethernet/broadcom/bcmsysport.c