[PATCH net v2 0/2] net: ibm: emac: fix the fixed-link PHY setup

From: Linkui Xiao

Date: Mon Nov 23 2026 - 04:33:07 EST


From: Linkui Xiao <xiaolinkui@xxxxxxxxxx>

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@xxxxxxx/
--
2.25.1