From: Andrew Lunn <andrew@lunn.ch>
To: yicongsrfy@163.com
Cc: linux@armlinux.org.uk, Frank.Sae@motor-comm.com,
davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com,
kuba@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com, yicong@kylinos.cn
Subject: Re: [PATCH] net: phy: avoid config_init failure on unattached PHY during resume
Date: Fri, 19 Sep 2025 14:45:12 +0200 [thread overview]
Message-ID: <df1f93ec-e360-4cb3-adf4-454f427851dc@lunn.ch> (raw)
In-Reply-To: <20250919073826.3629945-1-yicongsrfy@163.com>
> Since this issue cannot be fundamentally resolved within phylib,
> we need to seek a solution within the PHY driver itself.
How about this...
Allow a node in DT which looks like this:
mdio {
phy@0 {
# Broadcast address, ignore
compatible = "ethernet-phy-idffff.ffff";
reg = <0>;
}
phy@16 {
# The real address of the PHY
reg = <16>;
}
}
The idea being, you can use a compatible to correct the ID of a PHY.
The ID of mostly F is considered to mean there is no PHY there, its
just the pull-up resistor on the data line. So the PHY is returning
the wrong ID...
of_mdiobus_child_is_phy() then needs to change from a bool to an int,
and return -ENODEV for "ethernet-phy-idffff.ffff", and the caller
needs to correctly handle that and not create the device.
I would also suggest the PHY driver disables the broadcast address
when it gets probed on its real address.
Andrew
next prev parent reply other threads:[~2025-09-19 12:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 2:58 yicongsrfy
2025-09-10 8:15 ` Russell King (Oracle)
2025-09-10 9:17 ` yicongsrfy
2025-09-10 9:31 ` yicongsrfy
2025-09-10 9:57 ` Russell King (Oracle)
2025-09-10 9:54 ` Russell King (Oracle)
2025-09-11 11:25 ` yicongsrfy
2025-09-11 12:58 ` Andrew Lunn
2025-09-17 8:24 ` yicongsrfy
2025-09-17 10:06 ` Russell King (Oracle)
2025-09-19 7:38 ` yicongsrfy
2025-09-19 12:45 ` Andrew Lunn [this message]
2025-09-22 1:56 ` yicongsrfy
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=df1f93ec-e360-4cb3-adf4-454f427851dc@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Sae@motor-comm.com \
--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 \
--cc=yicong@kylinos.cn \
--cc=yicongsrfy@163.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®