🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24386

Re: [PATCH net 14/14] net: phy: as21xxx: Release reset before reading ID in match

#24386
From: Andrew Lunn
Date: Mon, 30 Nov 2026 03:53
17 lines
9160 bytes
On Mon, Nov 30, 2026 at 02:55:21AM +0200, Cristian Ciocaltea wrote:
> The Aeonsemi PHYs report a generic PHY ID until their firmware is
> loaded, so the driver reads the ID from the hardware while matching
> instead of relying on the ID cached at bus scan time.
> 
> The PHY only reports a valid ID while out of reset, which is not
> guaranteed.  phy_remove() asserts the reset and phy_probe() deasserts
> it, but probing only happens once a driver has matched.  Rebinding the
> driver, for instance by reloading the module, therefore reads the ID of
> a PHY held in reset.  This fails to match, leaving the PHY in reset with
> no driver bound, which cannot be recovered without a power cycle.

We don't do fun and games like this. We just require the compatible in
DT contains the ID, if the ID cannot be reliably read from the device.

   Andrew
Technical Details
Message-ID: <544910f4-6f2c-4677-b9a9-045859ec1049@lunn.ch>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373855-linux-kernel-netdev=dewy.ru
References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-14-1bd2eae6ccbc@collabora.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373855-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 14/14] net: phy: as21xxx: Release reset before
 reading ID in match
Date: Mon, 30 Nov 2026 04:53:42 +0100
Organization: Usenet Network
Message-ID: <544910f4-6f2c-4677-b9a9-045859ec1049@lunn.ch>
References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com>
 <20261130-as21xxx-fixes-v1-14-1bd2eae6ccbc@collabora.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1326984"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:MV1SHuhOtQcDoAPbivzX9tLf82c= sha256:n5Q3e50RiDHbOtmu+b6KNucf2/6YzhrC/Izhmsnkbqs=
	sha1:7RxxgQu9gcTyQI/atZTtjyyQg/Y= sha256:YbFvSfvn0CEMYj2astQ/OAurUqoTr5W0UVFeEgCEKNw=
Content-Disposition: inline
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 B1FE6125FBC; Mon, 30 Nov 2026 06:54:03 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	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=lunn.ch
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 7lcRseZ5cu49;
	Mon, 30 Nov 2026 06:54:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-373855-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 12057125F93; Mon, 30 Nov 2026 06:53:52 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 38B91600727; Mon, 30 Nov 2026 03:53:52 +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=1796010830;
	b=uvU/hIlv6jfry1qD0MQgO1NbVuanh4pQksyIEoDt3GhSMJHsW9aP2jWNf/OUxLvrL1Zx
	 OSNtZncGMVX1MwqvLnnSYgN7vmhydpK7e4wEzD4NDuplNTgcel/08ZGjqPZhzvXBOXZQe
	 QDKLixzm4AORoSuFKDSDqwW4vUr+xtFltDw/3OZFIXuzLeHdPU7bk2jSmwHZC7KyhAMW8
	 TqtU/3ui0FG7/Uhh2RYg9P8enQ7kwzYUXGHg+/6ReQCNyG/mxjVaL3PmwQjd0rDBZwMlj
	 zoruim+R6l33u2qAn65y108E8PND5Gx2bhH2MZxxDtsU8nELaxs062pClcGIhNnwGUQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796010830;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=rxzSK3tiNlolxzhu4ehFBPLdb4GSn3m9sfivfUGOoq8=;
	b=ns+qfsDLgngTEwxxO8PFV2VVTDw7djwPSFPI/GoL2aLFNxibFkSyHBVN9st4qBNgbXJ1
	 2coZZdCp3SIG75gQElJijYDPAZuIZURXsyixqIJTv86FMm1wG6MwVCex/ONm6nzfIk3cK
	 n2NM0ouw/BBpCqLx9CbYdedLr2eHngXrJha7YZQCglZTa2/dnzKJYk6+etT/uMZCb/O4T
	 vnYfs9AO1oby+uR3RjBV3jpqKpZ33dJkbwVVsbqT3FsaXMP1aTPEOLrKfRlYcI02Zq95m
	 9HZMGaZAPU/SEmvEdHr3LbrMLmtag3f0e34EEmsGelT7OueaYd2c5fH552F2PHgWv8g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b="S/VKjTru";
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 04086606A32D;
	Mon, 30 Nov 2026 03:53:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=S/VKjTru
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796010829;
	b=mn+eqOmBKR6JOXpKAtpvM50MPOtWUq8ucPsAMCNj8SWGkD03dyjDOf2opr/PQnsKV/ho
	 NqqI8qEGZ3O9A8/nNLyUmKwTDiheM5nJA47xG0YsiZqMEp30QYtAOStukB6tWMZa0b4mn
	 v7ZIaEQPyj9+67UMfmHcuU4Gfe31Gdb2eiQzA6aCoL8FDIL0G0A7qI/raSm5lr/U6pbGM
	 EQBQXMTgdebLd1gmKi7ggUEe6BbAEty+AeVCNtGYSYOiy5NjoVIoucKzQD8xcAKgYZXDX
	 4C5gCG+x1zDekz6IauDIWp5zt1lXUFkJ4BsiX64H2fLSpnUMcRgG+J0HPuMW0JSazqQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796010829;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=rxzSK3tiNlolxzhu4ehFBPLdb4GSn3m9sfivfUGOoq8=;
	b=f0DRlfyRub2RoYjpRyL7clpa80kQbBG/RBNKqtea7N348giUdLKhW5ncZT4/Sz9EuHB6
	 K53c6szTSxNn+NG3E7Nkox39s4KSLgzsja7TYFYdGI2vTm0lj7JUP1PWCGdD6yBnLYyq+
	 4vC8xRbJ5yflJZVPIFabIJxY0QIKxcmq+2ozrL5KDMFmh0VOiBuEiZZgFof/Vebw8WbH1
	 E+un1mS47BJ4xQG4jhCot/tQFstGa6Wq4Ry0PqWGklC3vZV1wAxFK5xKZy8R7TOXW8nAG
	 zFYhuS33q9x4fX+OeOjqjt95puX9TbGS3dzzszNDCxSkiN00AkzOtLFdgLSxTxKMw7w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b="S/VKjTru";
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2194606A31C
	for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 03:53:48 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D2194606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=rxzSK3tiNlolxzhu4ehFBPLdb4GSn3m9sfivfUGOoq8=; b=S/VKjTru8oNgPlOnAkcOxfnl+K
	09R1UwPpAwAEcMZPv7U+Q3xAHHVE5TJ/MpjbGw0wgqi9UmzW2S4qdaVUc0eQwj+xyPbfVOCJXDHxz
	Qd6tJloocMJnCXLHTdIAddLDuh6GCxBL8s6ES7zB6ewzZYl/jpwc6U0uKfIv6M/lacn4=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xXsSU-002HVf-2I; Mon, 30 Nov 2026 04:53:42 +0100
X-Cc: Christian Marangi <ansuelsmth@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@collabora.com, netdev@vger.kernel.org
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-In-Reply-To: <20261130-as21xxx-fixes-v1-14-1bd2eae6ccbc@collabora.com>