[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMFKvS-Dm0hhJVnO@shell.armlinux.org.uk>
Date: Wed, 10 Sep 2025 10:54:05 +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:17:03PM +0800, yicongsrfy@....com wrote:
> Then, because `phydev->interface != PHY_INTERFACE_MODE_SGMII`, it attempts
> to enter `ytphy_rgmii_clk_delay_config` to configure the RGMII tx/rx delay.
> However, since this PHY device is not associated with any GMAC and is not
> connected via an RGMII interface, the function returns `-EOPNOTSUPP`.
It seems the problem is this code:
/* set rgmii delay mode */
if (phydev->interface != PHY_INTERFACE_MODE_SGMII) {
ret = ytphy_rgmii_clk_delay_config(phydev);
which assumes that phydev->interface will be either SGMII or one of
the RGMII modes. This is not the case with a PHY that has been
freshly probed unless phydev->interface is set in the probe function.
I see the probe function decodes the PHYs operating mode and
configures stuff based on that. Maybe, as it only supports RGMII
and SGMII, it should also initialise phydev->interface to the initial
operating condition of the PHY if other code in the driver relies
upon this being set to either SGMII or one of the RGMII types.
--
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