* [PATCH net v2 0/2] net: ibm: emac: fix the fixed-link PHY setup
@ 2026-11-23 9:31 Linkui Xiao
0 siblings, 0 replies; only message in thread
From: Linkui Xiao @ 2026-11-23 9:31 UTC (permalink / raw)
To: andrew
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, rosenp,
jacob.e.keller, daniel.machon, chunkeey, kees+treewide, netdev,
linux-kernel, xiaolinkui
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:31 [PATCH net v2 0/2] net: ibm: emac: fix the fixed-link PHY setup Linkui Xiao
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®