🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20849

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

#20849
From: Linkui Xiao
Date: Mon, 23 Nov 2026 09:31
41 lines
9990 bytes
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
Technical Details
Message-ID: <20261123093201.770552-1-xiaolinkui@126.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369187-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369187-linux-kernel-netdev=dewy.ru
From: xiaolinkui@126.com (Linkui Xiao)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 0/2] net: ibm: emac: fix the fixed-link PHY setup
Date: Mon, 23 Nov 2026 17:31:59 +0800
Organization: Usenet Network
Message-ID: <20261123093201.770552-1-xiaolinkui@126.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="3839155"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FGcRjdNm7vpAfV1/NFOHEYhJqx0= sha256:C1nTo5WmYNt/Qo9yjGWZm06ms3kpjMC4XsPBNuD7vzs= sha1:EJtFghGf5Toi4mZ/YxygAJN+hIk= sha256:AFxztAF77JFJPzUhbE54r7fRGFb6u3ZXD2mUazL5nxc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 07414125D96; Mon, 23 Nov 2026 12:33:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=126.com
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7FpMvZ7Wu5Zd; Mon, 23 Nov 2026 12:33:26 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369187-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=126.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 2823D125D98; Mon, 23 Nov 2026 12:33:17 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 9DB8629C35; Mon, 23 Nov 2026 09:33:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795426395; b=AdHlJYKVUXiHt09EtaGbrqRZM7nuvp8ucfpL3C7ZqfOUPPoHBHmE8FvGu6pFnmlVmGRJ MDguQ7skhyDoYP8h616/QHcugt1XYEF9CxvzSb2fno7y7Zq6Meh28tmUqEYwZWkIet56a 8Jq2xCw/ETPqflO/F6/W0UszolbUwIfMiUD9309yvRNxLD2HZdVD1Uvn8S3Z7BQOVhKwG 5VZOcPOe9eJALZcoYvIIrNMRbCSmecDYjN+V58Dcg5EtiSV08Jtuw8ELQn68YP4rXGnO6 sbzufkjK6O7F+TtiYhYLsPQKTinhuGy3aJjmY9D0VSiC/iWZRG/4zn/q2nFq60ohxeA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795426395; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-Id:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-CM-SenderInfo; bh=06xW9tpMkIb4xf56q97ikdYDFsFWiDpB39ws2pekZss=; b=2xCUvIyuCJawk6O5MPgyRQlzUc8kmazhOP1VeinkTk+QkM0WL9l3Gq2QIObJv+EuwJwN D/ZTGr9mKLD1tia0TjfIKP1Sy5PBaQEF02gRkmuY+5MkE+4TxCNmq287lSdVOKYVpZVzH T9BWIP8WKP1c3jS0HepYLtRylVU05e8bxIlmF92LK2K72cwx6yiucNGAzUO8UkRV1CpD5 F8OTHbWUzbnWd6tWHe8FZBLWwLg2LpQFjxufTuzRnWjwjbyS5e/SSqdgQ2aSqj9xNWuc5 w/fFFP++yQJolrf792dmUbcDy24J4ioTSZIRPrl/x+Nd1f+stfxrYS/R6ZAnWsKK3Pw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=UTXvCv06; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58DC5606A333; Mon, 23 Nov 2026 09:33:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=UTXvCv06
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=117.135.210.9
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795426384; b=KyoYIAPh4ocRYMjHeUHczWRDs75Ya/N6Bjltj8ElIkHeDUHwWQlvb8LgZ8qD/HxGxL7X zlaWdyn3fO0jjaLFGXKPWvvZZVPgsmsMsyGxfIN9SwL6oKjsMZCjG01AMCDHVKRvbzmhs j9MC/RrPhb7BPQloJE0elH9cWcl+JJULyclsF1T0P4bgXAsAfolzF6i8ugAMbGeDJhGWL Mm61A+W7HdMROYWzjsBLgS9rQIV/ctgD/4PDYHx4q+67BuoIJ8xoHcefcdkxM3eWpo8DI 8gnLyMlI2/wL+dEWKxUe+JXCPfoSpcZW+Rgied0NQt6eTyYPXkWUQOH8W0c3dXgT1cg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795426384; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo; bh=06xW9tpMkIb4xf56q97ikdYDFsFWiDpB39ws2pekZss=; b=FTwlvB4r3/gsv8tGsJ8+iAFZSpFK3jCapPQDI9dSgFRpDoJTt7PQ19IJO5C7e757cVJE FumhXWsXQqD14mGYRWAcp3aF1+052LR5JEtAzCAVtuiC02LmOpbjd8TeX5DDNbB5Pwa78 zLOqiHK5pUpqtjyZ6GNOpsUeF51gLJIweYiLe6qKALUwUwQZL+ZZ4rRYioqk4Il1Bdipj bH/CTKISqK9sdGo5L8MmWoMKcY7k4JYPOW52VrRJ4XHYxojPppqPMYhGMc67E+XnR2UW5 S6pa/uZwP/J2RfdN5YS1MUvz/HvzpDBpl0bWs+cW/rNoxrrTCjcgHxJXY+hKJ5yfegw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=UTXvCv06; arc=none smtp.remote-ip=117.135.210.9
X-Received: from m16.mail.126.com (m16.mail.126.com [117.135.210.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B57606A32E; Mon, 23 Nov 2026 09:33:02 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E8B57606A32E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=06 xW9tpMkIb4xf56q97ikdYDFsFWiDpB39ws2pekZss=; b=UTXvCv06+PM7qefyha LzUE4AVOs6DG7qkBexqa4gz0qEysm3EBXkyAycLMQs821MoxHZWJJMMtHgsGD0k+ dfD6ooQMhst2ZMZXKaQAV7pbZrgnSCSHynX3vY2ZVhQwdr2Tc4ur85Vs4VbW/Ryl wk+Wujrg3FSnY3c8OPlddYiws=
X-Received: from localhost.localdomain (unknown []) by gzsmtp4 (Coremail) with SMTP id PykvCgD3l7UTCARrlp7DDw--.2488S2; Mon, 23 Nov 2026 17:32:04 +0800 (CST)
X-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
X-Mailer: git-send-email 2.25.1
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-CM-TRANSID: PykvCgD3l7UTCARrlp7DDw--.2488S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7Kw1UGFWkZF1UWF17tw1xuFg_yoW8Ary8pa yrJFsayr1kWw4S9Fs3ArW0vryY9a1kJa4UJFyIq3yYqFyUAryIvr4rGrW5ta4jkr97JFyj vFZ2ka93uFn8AaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UYiiDUUUUU=
X-CM-SenderInfo: p0ld0z5lqn3xa6rslhhfrp/xtbBlBTiuWsECBTLgwAA3g