[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4c9PlfEC17pVE08@shell.armlinux.org.uk>
Date: Wed, 30 Nov 2022 11:23:42 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Clark Wang <xiaoning.wang@....com>
Cc: peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
joabreu@...opsys.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, mcoquelin.stm32@...il.com,
andrew@...n.ch, hkallweit1@...il.com, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: phylink: add sync flag mac_ready to fix resume
issue with WoL enabled
On Wed, Nov 30, 2022 at 07:11:47PM +0800, Clark Wang wrote:
> Issue we met:
> On some platforms, mac cannot work after resumed from the suspend with WoL
> enabled.
>
> The cause of the issue:
> 1. phylink_resolve() is in a workqueue which will not be executed immediately.
> This is the call sequence:
> phylink_resolve()->phylink_link_up()->pl->mac_ops->mac_link_up()
> For stmmac driver, mac_link_up() will set the correct speed/duplex...
> values which are from link_state.
> 2. In stmmac_resume(), it will call stmmac_hw_setup() after called the
> phylink_resume(). stmmac_core_init() is called in function stmmac_hw_setup(),
... and that is where the problem is. Don't call phylink_resume() before
your hardware is ready to see a link-up event.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists