From: Linkui Xiao <xiaolinkui@126.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rosen Penev <rosenp@gmail.com>,
Christian Lamparter <chunkeey@gmail.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Kees Cook <kees+treewide@kernel.org>,
Daniel Machon <daniel.machon@microchip.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-kernel@vger.kernel.org, Linkui Xiao <xiaolinkui@kylinos.cn>
Subject: Re: [PATCH net v4] net: ibm: emac: attach and start the fixed-link PHY
Date: Mon, 30 Nov 2026 10:49:22 +0800 [thread overview]
Message-ID: <27e11e9a-bff3-4f66-bac1-4cc3e10bca5a@126.com> (raw)
In-Reply-To: <a7773c81-a42d-4989-a0e3-68851226424a@lunn.ch>
On 2026/11/29 00:03, Andrew Lunn wrote:
> On Fri, Nov 27, 2026 at 09:47:48AM +0800, Linkui Xiao wrote:
>> From: Linkui Xiao <xiaolinkui@kylinos.cn>
>>
>> emac_init_phy() sets ndev->phydev by hand for a fixed link, so
>> phy_attach_direct() never runs. The PHY is missing from the netdev's PHY
>> link topology and ETHTOOL_MSG_PHY_GET dereferences the NULL link_topo in
>> phy_prepare_data().
>
> The size and complexity of this change is snowballing. Without having
> hardware to test on, i'm wondering if it is better to just leave it
> broken. I don't think any user has reported it, so it does not bother
> anybody.
>
> What really needs to happen is a complete rewrite, and that definitely
> needs hardware.
Agreed. Each round has moved more of the PHY lifecycle around (start,
stop, disconnect, the probe unwind and the remove ordering), and I have
no 4xx hardware to check any of it, so I will not respin this one. The
rewrite is not something I can take on without access to a board.
[OPTIONAL, see notes: delete this paragraph if you do not want to
offer the alternative]
One much smaller option, in case it is of any use: the oops itself is
phy_prepare_data() in net/ethtool/phy.c doing xa_load() on a NULL
dev->link_topo. A two-line "if (!topo) return -EOPNOTSUPP;" there
would turn `ethtool --show-phys` on such a netdev into a clean error
instead of an oops, without touching emac at all. I will only send that
if you want it; otherwise I will leave the whole thing alone.
pw-bot: rejected
prev parent reply other threads:[~2026-11-30 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 1:47 Linkui Xiao
2026-11-28 2:39 ` netdev-bot+sashiko
2026-11-28 16:03 ` Andrew Lunn
2026-11-30 2:49 ` Linkui Xiao [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=27e11e9a-bff3-4f66-bac1-4cc3e10bca5a@126.com \
--to=xiaolinkui@126.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=chunkeey@gmail.com \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=jacob.e.keller@intel.com \
--cc=kees+treewide@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@gmail.com \
--cc=xiaolinkui@kylinos.cn \
/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®