Thread (15 messages) flat view 15 messages, 4 authors, 2021-06-28

RE: [PATCH net-next V1 3/4] net: stmmac: Reconfigure the PHY WOL settings in stmmac_resume()

From: Voon, Weifeng <hidden>
Date: 2021-06-25 15:59:07
Also in: linux-arm-kernel, lkml

quoted
No, the interrupt will not be discarded. If the PHY is in interrupt
mode, the interrupt handler will triggers and ISR will clear the WOL
status bit.
quoted
The condition here is when the PHY is in polling mode, the PHY driver
does not have any other mechanism to clear the WOL interrupt status bit.
Hence, we need to go through the PHY set_wol() again.
I would say you have a broken setup. If you are explicitly using the
interrupt as a wakeup source, you need to be servicing the interrupt. You
cannot use polled mode.
 
Sorry for the confusion. But I would like to clarify the I should use the
term of "WOL event status" rather than "WOL interrupt status". 
For interrupt mode, clearing the "WOL interrupt status" register will auto
clear the "WOL event status".
For polling mode, the phy driver can manually clear the "WOL event status" by
setting 1 to "Clear WOL Status" bit.  


I would like to rephase the commit message to make things clear:

After PHY received a magic packet, the PHY WOL event will be
triggered. At the same time, the "Magic Packet Match Detected" bit
is set. In order for the PHY WOL event to be triggered again, the 
WOL event status of "Magic Packet Match Detected" bit needs to be 
cleared. When the PHY is in polling mode, the WOL event status needs
to be manually cleared.

Ethtool settings will remain with WOL enabled after a S3/S4
suspend resume cycle as expected. Hence, the driver should
reconfigure the PHY settings to reenable/disable WOL
depending on the ethtool WOL settings in the MAC resume flow.
The PHY set_wol flow would clear the WOL event status.

Weifeng


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help