🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15821

Re: [PATCH net 0/4] net: phy: restore driver state after userspace MII resets

#15821
From: Andrew Lunn
Date: Fri, 13 Nov 2026 13:33
15 lines
8799 bytes
On Fri, Nov 13, 2026 at 01:48:39AM -0700, James Hilliard wrote:
> An MII ioctl reset needs to restore the PHY driver's configuration and
> software state before the PHY worker can access the device again.

The MII ioctl is a footgun. If you use it for writing registers, don't
be surprised if bad things happen. Even reading registers can cause
bad side effects, like missed interrupts.

The whole design is broken, there is no fixing it, so we don't try to
fix it.

Sorry, but NACK.

       Andrew
Technical Details
Message-ID: <11acd5b1-3099-4e3f-9fdf-a3c5c6f098c4@lunn.ch>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362674-linux-kernel-netdev=dewy.ru
References: <20261113-submit-phy-mii-reset-v1-v1-0-02a55f352a91@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362674-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 0/4] net: phy: restore driver state after userspace
 MII resets
Date: Fri, 13 Nov 2026 14:33:24 +0100
Organization: Usenet Network
Message-ID: <11acd5b1-3099-4e3f-9fdf-a3c5c6f098c4@lunn.ch>
References: <20261113-submit-phy-mii-reset-v1-v1-0-02a55f352a91@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1380654"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:dSBU40jfGHHrSSDUSJXAGaZlwBo= sha256:PiiFEBHBG/sN7QkdPcHBzhF0RIgBGi0Vo7QEBeuZZBg=
	sha1:Tw1hjcMQYY+ih2v+kvXl1WvBxZY= sha256:CSjoU0woTA8GvNnFtyj/Fimc8htEKYft33RkU3UyaxA=
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 0DE941145AA; Fri, 13 Nov 2026 19:18:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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, 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 qfuWYeOhGDYO;
	Fri, 13 Nov 2026 19:18:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362674-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0716B1145A7; Fri, 13 Nov 2026 19:18:22 +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 B42B438A4E5; Fri, 13 Nov 2026 13:35:50 +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=1794576825;
	b=hqR5asLZY5ETI3nGGucviOkeGP+RL1w07OkBnQX/Slis3q9cqQ0L0HB15TEt5mTGTy2f
	 aNVli/I9W/ei8L6gMK50Cv5IHVR9iiRiIoUPHMe4yq6h8iMrefzriJ3B3NHylCHABYene
	 Du1XBiZLYhSPCrDR00x0STX5LguxRvzO3AoSKpmSEQc5dfSpxlMnh+hvTQafl7QCildnk
	 t1cyBTQ7XKfA2pJVb+rppgcvTnPVikdpwP5s/GUmRsJW1AzSYaR5t84AzN3t8/AObS4VW
	 swzC4NFcodyyERQM1aXcCPnEfcVhV9GuWQfAxSHkS1h51UyGrjRHtY4R/yaS/Jz/4oA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794576825;
	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=MBuJpHp3mo0oc5xPyGY7mPd/0AyD5zGxQMXpwyVexpY=;
	b=yiX1tJ/G4N2rM1vm1q/8in93u1hNnuDnLic9ykVHvAI2a42l/WO0XjPzc5OVSR0++1uH
	 RFdu+auxBZi5xT7DN33doy++JGDNGBGVTLk6s3DFwZRxXlNohCYO2BoIhFjIDeF45ZIIS
	 Txe24qUz4Szqt+QkbQWjxYAc/V+Fpzw3now6YxwXbW+t9fIsFG33CKhL0UReGdgr8zbbv
	 k7V3cYD8gZ7RzSoe/ZrwV0wig2fItr/Vsr7mGuKW7SCbvP80gsF+bw88h7XiBHSc4/76C
	 yrTQr1mZ0Aikp/27Lt26OOhqA6Nr8geEiUGygkqdl6TUySzf+7trg9BJUNjyH8f3IsQ==
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=LtPFJ58u;
	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 CECEB606AB80;
	Fri, 13 Nov 2026 13:33:45 +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=LtPFJ58u
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=1794576820;
	b=kVoLJmawRdkB6Dh8f7qtYF+hTf3BGUzeyu+X69wpFwo4vD+CCPh87hom5SZWhJKhMiwE
	 brO2yV1W9eQVDpzUJng2gsKyqZjU13U+o+tZCsS8gYxwPIAg+k2K2AYpC94wtDWehm96s
	 s1vaCBzaH9Azi6shU+YdzAoj5bMcMMPu4MjugWdivhdlK1CMJgIUVjhBZcBXIXmYgzOGq
	 pnnErICLMMx66Gtx1jv0G18wCr3R4lgLUxS1Tb01ELTAVTiCSLhCMts82DGJ7WC7eQu/C
	 LFk6Q1qnZIg8XXI2wq3lACZp/OYDGGPmV+qauo6d6YkaWtXRdYiFxZ8tsyMf3AUx/hg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794576820;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=MBuJpHp3mo0oc5xPyGY7mPd/0AyD5zGxQMXpwyVexpY=;
	b=04LPZy3QyS0Dc5mcJ9/XhYkk8vSASRTMdru3/y098oN3T0YOJVHn14Yp5A/P1Z3eXKko
	 A5wZmP3K5JfYTq6IvqtFmeSuZTHOsqdXkdM3lZpY7s90Zsz59TKnUJkG/geC64dCdauHS
	 6rm5QTJg87UyLfzVn3TWxDrx03rlbmycxFJsDnxrXVw3MV9FXrxW26dPBi4APOk7OMbyx
	 JWzBpxBbE3lc6+L5VFtLi7NI3RPZN4qujyaHQcAw39/UjwR0l4Y4WF5TugBQEUD7qctXe
	 mH7j/ljmowBdJdEdDJ84863EEdUfUETwrcHcq53XFSdEhVpchzfj3oI8kOVsE6mJlNw==
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=LtPFJ58u;
	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 AC5B6606AB8D;
	Fri, 13 Nov 2026 13:33:39 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AC5B6606AB8D
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=MBuJpHp3mo0oc5xPyGY7mPd/0AyD5zGxQMXpwyVexpY=; b=LtPFJ58ukFwK2zyCaT++BKxDIp
	Szed4Dj7e1ho2ZScZRmKRZhP2emZc6obizQNBfhtmfcFuRAM0a5YVWVy7Dk3pR5oOdCCqrw6e6iOS
	AmJGpJ1hAqEsZaVp0cuBfAYVpq9iFB5OCEKMSR42Gyu32LW1ib6bpyEFiKtjARfvycBI=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xRrPA-00GHgd-NO; Fri, 13 Nov 2026 14:33:24 +0100
X-Cc: 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>,
	Michael Chan <michael.chan@broadcom.com>,
	Hauke Mehrtens <hauke@hauke-m.de>, netdev@vger.kernel.org,
	linux-kernel@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: <20261113-submit-phy-mii-reset-v1-v1-0-02a55f352a91@gmail.com>