Thread (32 messages) flat view 32 messages, 5 authors, 2021-09-07

RE: [PATCH] net: stmmac: fix MAC not working when system resume back with WoL enabled

From: Joakim Zhang <hidden>
Date: 2021-09-06 10:41:52

Hi Russell,
-----Original Message-----
From: Russell King <linux@armlinux.org.uk>
Sent: 2021年9月6日 17:35
To: Joakim Zhang <redacted>
Cc: Andrew Lunn <andrew@lunn.ch>; Vladimir Oltean <olteanv@gmail.com>;
peppe.cavallaro@st.com; alexandre.torgue@foss.st.com;
joabreu@synopsys.com; davem@davemloft.net; kuba@kernel.org;
mcoquelin.stm32@gmail.com; netdev@vger.kernel.org; f.fainelli@gmail.com;
hkallweit1@gmail.com; dl-linux-imx [off-list ref]
Subject: Re: [PATCH] net: stmmac: fix MAC not working when system resume
back with WoL enabled

Hi,

On Mon, Sep 06, 2021 at 02:29:30AM +0000, Joakim Zhang wrote:
quoted
Hi Russell,
quoted
-----Original Message-----
+		/* Re-apply the link parameters so that all the settings get
+		 * restored to the MAC.
+		 */
+		phylink_mac_initial_config(pl, true);
+		phylink_enable_and_run_resolve(pl,
PHYLINK_DISABLE_MAC_WOL);
quoted
There is no "phylink_enable_and_run_resolve " sysbol, I guess you want do
below operations in this function:
quoted
	clear_bit(PHYLINK_DISABLE_MAC_WOL, &pl->phylink_disable_state);
	phylink_run_resolve(pl);
Yes, that is correct.

Please let me know whether that works for you.
Thanks Russell, it works as we are expected, I test both MAC-based WoL active and inactive cases.

And I get the point you mentioned before, if link parameters changed during system suspended, what would happen?
I tried both FEC and STMMAC, the system can't be waked up via remote magic packets!!!
I have not think about this scenario before....

Since net-next is closed, so I would cook a patch set (keep you as the phylink patch author) after it re-open, could you
accept it? Or you plan to prepare this patch set for stmmac?

There is also a problem, we need a fix for LTS (5.10, 5.15), above patch set should go to 5.16, do you have any suggestion?

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