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] [day] [month] [year] [list]
Message-ID: <fbb2da18-0929-4c61-a940-6a3d4fbea3e2@lunn.ch>
Date: Wed, 9 Jul 2025 15:33:33 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Buday Csaba <buday.csaba@...lan.hu>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH] net: mdio: reset PHY before attempting to access
 registers in fwnode_mdiobus_register_phy

On Wed, Jul 09, 2025 at 03:24:24PM +0200, Buday Csaba wrote:
> Some PHYs (e.g. LAN8710A) require a reset after power-on,even for
> MDIO register access.
> The current implementation of fwnode_mdiobus_register_phy() and
> get_phy_device() attempt to read the id registers without ensuring
> that the PHY had a reset before, which can fail on these devices.

This is specific to this device, so the driver for this device should
take care of the reset.

To solve the chicken/egg, you need to put a compatible in the PHY node
listing the ID of the PHY. That will cause the correct PHY driver to
load, and probe. The probe can then reset it.

We have to be careful about changing the reset behaviour, it is likely
to break PHYs which currently work, but stop working when they get an
unexpected reset.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ