[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMFLjHDH71fTwLwj@shell.armlinux.org.uk>
Date: Wed, 10 Sep 2025 10:57:32 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: yicongsrfy@....com
Cc: andrew@...n.ch, davem@...emloft.net, edumazet@...gle.com,
hkallweit1@...il.com, kuba@...nel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, pabeni@...hat.com, yicong@...inos.cn
Subject: Re: [PATCH] net: phy: avoid config_init failure on unattached PHY
during resume
On Wed, Sep 10, 2025 at 05:31:00PM +0800, yicongsrfy@....com wrote:
> One more point: in the suspend flow as shown below:
> `mdio_bus_phy_suspend`
> => `mdio_bus_phy_may_suspend`
> there is also a check whether `phydev->attached_dev` is NULL.
Yes, it checks, but only to bypass checking for things that are
dependent on whether a netdev exists. It doesn't _stop_ a netdev-less
PHY being suspended. What you're proposing _stops_ a netdev-less PHY
being resumed. You are proposing to break stuff.
> Therefore, my idea is to make this modification to maintain consistency in the logic.
No, it's making inconsistency. mdio_bus_phy_resume() will only resume a
PHY that has previously been suspended by mdio_bus_phy_suspend(). See
the phydev->suspended_by_mdio_bus flag.
Fix the motorcomm driver.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists