lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMEzv50VmUb2eUMQ@shell.armlinux.org.uk>
Date: Wed, 10 Sep 2025 09:15:59 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: yicongsrfy@....com
Cc: andrew@...n.ch, hkallweit1@...il.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	yicong@...inos.cn
Subject: Re: [PATCH] net: phy: avoid config_init failure on unattached PHY
 during resume

On Wed, Sep 10, 2025 at 10:58:26AM +0800, yicongsrfy@....com wrote:
> From: Yi Cong <yicong@...inos.cn>
> 
> When resuming a PHY device that is not attached to a MAC (i.e.
> phydev->attached_dev is NULL), mdio_bus_phy_resume() may call into
> phy_init_hw() -> phydev->drv->config_init(), which can return -EOPNOTSUPP
> (-95) if the driver does not support initialization in this state.
> 
> This results in log messages like:
> [ 1905.106209] YT8531S Gigabit Ethernet xxxxmac_mii_bus-XXXX:00:01:
> PM: dpm_run_callback(): mdio_bus_phy_resume+0x0/0x180 [libphy] returns -95
> [ 1905.106232] YT8531S Gigabit Ethernet xxxxmac_mii_bus-XXXX:00:01:
> PM: failed to resume: error -95
> 
> In practice, only one PHY on the bus (e.g. XXXX:00:00) is typically
> attached to a MAC interface; others (like XXXX:00:01) are probed but
> not used, making such resume attempts unnecessary and misleading.
> 
> Add an early return in mdio_bus_phy_resume() when !phydev->attached_dev,
> to prevent unneeded hardware initialization and avoids false error reports.

PHYs are allowed to be attached without a net device. Your PHY
driver needs to cope with this condition.

-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ