* [PATCH net] net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
@ 2020-02-05 20:32 Florian Fainelli
2020-02-06 13:29 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2020-02-05 20:32 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller,
open list:BROADCOM SYSTEMPORT ETHERNET DRIVER, open list
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>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index f07ac0e0af59..e0611cba87f9 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -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
*/
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
2020-02-05 20:32 [PATCH net] net: systemport: Avoid RBUF stuck in Wake-on-LAN mode Florian Fainelli
@ 2020-02-06 13:29 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-06 13:29 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, bcm-kernel-feedback-list, linux-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 5 Feb 2020 12:32:04 -0800
> 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.
Must be some weird state latching or something like that...
> 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>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-06 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 20:32 [PATCH net] net: systemport: Avoid RBUF stuck in Wake-on-LAN mode Florian Fainelli
2020-02-06 13:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).