Skip to content

Commit

Permalink
net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
Browse files Browse the repository at this point in the history
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: 83e82f4 ("net: systemport: add Wake-on-LAN support")
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ffainelli authored and davem330 committed Feb 6, 2020
1 parent 21b5f67 commit 263a425
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2736,6 +2736,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
*/
Expand Down

0 comments on commit 263a425

Please sign in to comment.