From: Andrew Lunn <andrew@lunn.ch>
To: Buday Csaba <buday.csaba@prolan.hu>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH] net: mdio: reset PHY before attempting to access registers in fwnode_mdiobus_register_phy
Date: Wed, 9 Jul 2025 15:33:33 +0200 [thread overview]
Message-ID: <fbb2da18-0929-4c61-a940-6a3d4fbea3e2@lunn.ch> (raw)
In-Reply-To: <20250709132425.48631-1-buday.csaba@prolan.hu>
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
prev parent reply other threads:[~2025-07-09 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 13:24 Buday Csaba
2025-07-09 13:33 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbb2da18-0929-4c61-a940-6a3d4fbea3e2@lunn.ch \
--to=andrew@lunn.ch \
--cc=buday.csaba@prolan.hu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®