From: Linkui Xiao <xiaolinkui@126.com>
To: andrew@lunn.ch
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, rosenp@gmail.com,
jacob.e.keller@intel.com, daniel.machon@microchip.com,
chunkeey@gmail.com, kees+treewide@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
xiaolinkui@kylinos.cn
Subject: [PATCH net v2 0/2] net: ibm: emac: fix the fixed-link PHY setup
Date: Mon, 23 Nov 2026 17:31:59 +0800 [thread overview]
Message-ID: <20261123093201.770552-1-xiaolinkui@126.com> (raw)
From: Linkui Xiao <xiaolinkui@kylinos.cn>
EMAC never attaches the fixed-link PHY, so it is missing from the netdev's
PHY link topology and ETHTOOL_MSG_PHY_GET crashes. Attaching it also
means it has to be detached again, and it exposes a second bug: since
commit d99b408ed8e5 nothing fills in the phy_device status, so the driver
has been programming the MAC as 10 Mbit/s half duplex for every fixed
link.
Both are fixed here, in the order that keeps the series bisectable.
Cross compiled for powerpc out of ppc44x_defconfig with W=1. No
hardware, so no runtime test.
Note per Documentation/process/generated-content.rst: the changes were
developed with an AI coding assistant; the analysis, build testing and
review are mine.
Linkui Xiao (2):
net: ibm: emac: attach the fixed-link PHY with of_phy_connect()
net: ibm: emac: read the fixed-link status before adjusting the link
drivers/net/ethernet/ibm/emac/core.c | 31 +++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
---
v2:
- rewrote the commit message by hand and kept it to the reasons for the
change (Andrew Lunn)
- explain why emac_adjust_link() is still called by hand (Andrew Lunn)
- disconnect the PHY in emac_remove() and on probe failure, and
deregister the fixed PHY when of_phy_connect() fails (Andrew Lunn,
Sashiko AI review)
- new 2/2: read the link status so emac_adjust_link() no longer copies
SPEED_UNKNOWN into dev->phy (Sashiko AI review)
- rebased: 4dd10fbbeb9c ("treewide: Convert devm_kmalloc() family to the
devm_kmalloc_obj() family") changed emac/core.c since v1
v1: https://lore.kernel.org/netdev/20261112075321.3903875-1-xiaolinkui@126.com/
--
2.25.1
reply other threads:[~2026-11-23 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261123093201.770552-1-xiaolinkui@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=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®