From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ADD823C51D for ; Mon, 13 Oct 2025 14:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760365895; cv=none; b=WvdRKMuWZSEIHfRIe3DDMA9J8YAmLybQCMNVfXo4DZ2e9LE9+vqmFJnqO+//E8mzkzSI1WjBIEP31A88Hprd8Rwt1eAh2acK7U/ZxpOE3QYtbR1OT78ZDGbBXz67YV+LsRCAMx56SzcWQBu7C6Z0yQ3EU+2WNgqVrjrhMqrpu9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760365895; c=relaxed/simple; bh=aQ1c98XzivlAObmVlDQknLGiHR9pCq3YGTOQGSuDWhU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=ZdbIQnghiKWFlFbsWzBAUWCW5efWaMiOYxPHLyDhxFx0E9CKUPbcGmqHUlYcOuGXdtRIUIBUqwPIdrUWwfOfDKbsLRg0ldpOmQ+0+jOKR0VmArHu/rgZgxNc1U390amiQ1dmDr56Twf1PAeH/uSHIaSqyyVdwO1maH/9JS8U5QQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SRzXEQWu; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SRzXEQWu" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id CB15A1A12F4; Mon, 13 Oct 2025 14:31:31 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 9EE1D606C6; Mon, 13 Oct 2025 14:31:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6A18B102F226E; Mon, 13 Oct 2025 16:31:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1760365891; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=QeXIbWW6PvkJg/zzCSvtGFpwQ/L35gN1j/tUzRFnQUg=; b=SRzXEQWuZJ2KdcMLcPYOCkQinK+SFfNWtvJjc6khBaxZUgMYj0mN+8fk/4/EzYu+bHaYyR VPXx8oHYZz7zkmC1g5TZ7aJ6/3ZQqa0iscBJzl0c8/NGgXrt0u59FjZt9syBht5hNi6uju dqFaRgMmcN7I6tG6gvAcx+ysRrHbHwbaVxjKzkPjjc1bUxvbksE2zJjp18lFCYDOdsDD2F xNhchEgMwKPU+KKXz1F8H7f6qWHgdqZhTwLGbVS8cspLgErr4uNbT+37udjtUShSHtbU8V suRrsY7flooTXai/T/pqFLhjrpDP+1YSrpEFZgccJH8iYb8OTsH0eY3C4y60vg== Message-ID: Date: Mon, 13 Oct 2025 16:31:10 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] net: mdio: reset PHY before attempting to access registers in fwnode_mdiobus_register_phy To: Buday Csaba , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251013135557.62949-1-buday.csaba@prolan.hu> <20251013135557.62949-2-buday.csaba@prolan.hu> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <20251013135557.62949-2-buday.csaba@prolan.hu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 Hi, On 13/10/2025 15:55, Buday Csaba wrote: > When the ID of an ethernet PHY is not provided by the 'compatible' > string in the device tree, its actual ID is read via the MDIO bus. > For some PHYs this could be unsafe, since a hard reset may be > necessary to safely access the MDIO registers. > This patch makes it possible to hard-reset an ethernet PHY before > attempting to read the ID, via a new device tree property, called: > `reset-phy-before-probe`. > > There were previous attempts to implement such functionality, I > tried to collect a few of these (see links). > > Link: https://lore.kernel.org/lkml/1499346330-12166-2-git-send-email-richard.leitner@skidata.com/ > Link: https://lore.kernel.org/all/20230405-net-next-topic-net-phy-reset-v1-0-7e5329f08002@pengutronix.de/ > Link: https://lore.kernel.org/netdev/20250709133222.48802-4-buday.csaba@prolan.hu/ > Signed-off-by: Buday Csaba This should probably be accompanied by a DT binding update, with some justification that this is indeed HW description and not OS confguration. At least the use of the term "probe" in the property makes this sound like OS configuration, maybe something like : "phy-id-needs-reset" ? Maxime