🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24327

Re: [PATCH net v4] net: ibm: emac: attach and start the fixed-link PHY

#24327
From: Linkui Xiao
Date: Mon, 30 Nov 2026 02:49
34 lines
10259 bytes

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
Technical Details
Message-ID: <27e11e9a-bff3-4f66-bac1-4cc3e10bca5a@126.com>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373788-linux-kernel-netdev=dewy.ru
References: <20261127014748.2908781-1-xiaolinkui@126.com> <a7773c81-a42d-4989-a0e3-68851226424a@lunn.ch>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373788-linux-kernel-netdev=dewy.ru
From: xiaolinkui@126.com (Linkui Xiao)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v4] net: ibm: emac: attach and start the fixed-link
 PHY
Date: Mon, 30 Nov 2026 10:49:22 +0800
Organization: Usenet Network
Message-ID: <27e11e9a-bff3-4f66-bac1-4cc3e10bca5a@126.com>
References: <20261127014748.2908781-1-xiaolinkui@126.com>
 <a7773c81-a42d-4989-a0e3-68851226424a@lunn.ch>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1315125"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:P2R3Q69PkKSjy9dyRSxtyXi1Bmk= sha256:7xiOPTKkfK/kHrcHudNmcIzkvdnuyNEAHhV95Rascrw=
	sha1:CEGEFyPYogSzCioJeYWcHs+c0rc= sha256:Kp7XLaa18Pq6eJJvzmoG4LGIBrt8TJDX9naWcpTNPlg=
Content-Language: en-US
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 A0E85125FB8; Mon, 30 Nov 2026 05:50:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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] 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 T1z1RB1skyWx;
	Mon, 30 Nov 2026 05:50:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373788-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0729D125FB3; Mon, 30 Nov 2026 05:50:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 1BF002915E; Mon, 30 Nov 2026 02:50:30 +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=1796007029;
	b=mZ/gaNPLDWm3wWgoeQc45o9mxjMyUyDUyAqeVt6W1rrdVliMClUvjcQjCVWR4Ey8bGjI
	 ZzaUcC4mM42xWU4joiwUaTF9aXsgUlludKCqb6/UKvhRSiqoZcvIDhPDKG5K/7NghNdZ3
	 mh62JUQORyeIZ6wGCS2BBfqwn1v/cmu9E5Q9BvqPJ7tc622yygtZyFeWX+Un0rAwR/lq/
	 KpoAknVY4W+6wAS5CV/OQTeeizUUbf39vKG9hxytemMMioY1Io0rDV9YNoNshiYYKYtQk
	 tqAKfygnMrzMzC/sX3yZ3/THpqe6NnZf9iypegLKpSZqpDB4hLXHoLUX0+zY/Wubi7g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796007029;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding:X-CM-TRANSID:
	 X-Coremail-Antispam:X-CM-SenderInfo;
	bh=Jl8b6jdyIiBjmc5ttHV7XPJnYvSj229NrUluadDmVHs=;
	b=moMF6SdXs1Wsy9IDdR3rrOLuVxLqdsBdfMzhOk+F5/R6vndCRgbCj/6eC1vgeZa40uoF
	 nkXHFBZ5hUXCpObHug/WNvfjJNYqRXemoN1IMXCZHZv9YlMLP2BX8AIFnSlcDS8AzLmdE
	 yUMrBxgI2uMieRGkSvA3b8rYuByqmXsRWOaq5JK3HmmfCCY6tYTyM/ZSfXbp8+hsMHlnY
	 s3kY6srZDNiIGYX5FVHpfkGnFGdpugab28C972cQzZe3yrjwSPYaujReEjIGlWkxmHUhk
	 TS5gv5qXawT+1qC+p5mAfLS2z5x37JGRVAeDpbP4reGsDqO0iDRc+jH1FlYvZFh+e3Q==
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=KMJ57wlD;
	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 64FE1606A331;
	Mon, 30 Nov 2026 02:50:29 +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=KMJ57wlD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.6
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796007028;
	b=WEvxXhgxPkb5/a5MuQzBu0DckRq4sSPoed3YnUFy8zgvkJUiVIJMeLd60rLQIZAfk+Cb
	 RY6/39uxgCjaFTKAKEnTEUcECHOh+YNobOvr9F9GqRqV/MNMDU0tvWMr6Qg87HDOvH3KI
	 COHvB/mnojwYf80jSBWWGFLwpRxgq/pgt2U5glUt1XPYF5OGV0V2zZ4uNwVNVhXoQN6uJ
	 etcm5NMydaUbsVhpXWo8anbSammwbuWtx0pF48Dpe6NU/hIn/s6z8eUXDYYoeir4BY7wx
	 AlwEVmDzLzp+7tgkJKgjYrOtBbLmy4SoOh+t8b+AcL29L12ynyloia8zVEOTWAHbSqw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796007028;
	h=DMARC-Filter:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding:X-CM-TRANSID:
	 X-Coremail-Antispam:X-CM-SenderInfo;
	bh=Jl8b6jdyIiBjmc5ttHV7XPJnYvSj229NrUluadDmVHs=;
	b=gGYTMsBoX7cTru6C/MGda8HDz469XD5MYrJEssRreFmouAYP+BHoFtRQV6L1jusYOu1g
	 e7SmfMrEIKImWscV2ASUlWTTFgzcJnFfbIWQRK31fwKKZL8mD4W3FjFUYka2p7d0+4Dep
	 peRuXvehRobhwajOKo49Wcqi9g2ljlb2Fm0Pz3+ieQNUWSMHoPuN83KUAcQLckHlDEvAN
	 TeBmHdJsVg1wAxIumFoj2XYIBHsfXvwpQUlsThjZ/fvMqczqp0PMbMAlqwmKCl/u17q3Z
	 ml08BBHLNToruA8fl9JCTkNk0w/vXVixYFDJC/Xh3KPMx71wkd8nSZ0vrYW7+iIc0hg==
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=KMJ57wlD;
	arc=none smtp.remote-ip=220.197.31.6
X-Received: from m16.mail.126.com (m16.mail.126.com [220.197.31.6])
	(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 A1D71606A333;
	Mon, 30 Nov 2026 02:50:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A1D71606A333
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=Message-ID:Date:MIME-Version:Subject:To:From:
	Content-Type; bh=Jl8b6jdyIiBjmc5ttHV7XPJnYvSj229NrUluadDmVHs=;
	b=KMJ57wlDXEgbenG/OZgNNQ9mK+cPpHdGPOw0cQzVpn4fSXf1aQhAT/OZRS/8IU
	+SxODdtTomHWywYpY2F4wMsQo4H4+v2Y0NBY+4bRSo1++mcnfXA9aG2t8kkHf+PT
	8IKgjBLJJYnGduYcTyBUmC7JfgLSCDPQNjKi/AK6bx2lk=
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-User-Agent: Mozilla Thunderbird
X-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>
X-In-Reply-To: <a7773c81-a42d-4989-a0e3-68851226424a@lunn.ch>
X-CM-TRANSID: _____wD3728z5Axr+2hnDg--.7973S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7CrW3XrW3Zr1fGFWrtrW3trb_yoW8XF15pa
	yY9Fs2krWqgrWft3srur4DX3yvv3Z8t3y3KFyFkF4rWrZ8WrnxGF40grWvga43CrySvrWY
	va1kWas5uF1qvFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
	9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UZZ2-UUUUU=
X-CM-SenderInfo: p0ld0z5lqn3xa6rslhhfrp/xtbBlBQk+msM5DQ+ZQAA3y