Article View: linux.kernel.netdev
Article #15884Re: [PATCH net 0/4] net: phy: restore driver state after userspace MII resets
From: Andrew Lunn
Date: Fri, 13 Nov 2026 17:50
Date: Fri, 13 Nov 2026 17:50
30 lines
9796 bytes
9796 bytes
On Fri, Nov 13, 2026 at 09:39:17AM -0700, James Hilliard wrote:
> On Fri, Nov 13, 2026 at 6:33 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > 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.
>
> Would it make sense to submit patches 1 and 2 as standalone fixes,
> separate from the reset recovery changes?
Ask the b44 Maintainers. It is unusual for MDIO to be none blocking,
so i do wounder about the other path.
> The b44 patch removes a spinlock held across sleeping phylib/MDIO
> operations, including ordinary register reads. The write-error patch
> propagates MDIO failures and avoids updating cached settings or running
> follow-up operations after a failed write.
We don't care about the cached settings. If you have used this API,
you must expect bad things to happen. It says so in the comment above.
Andrew
Technical Details
Message-ID:
<ed79ced2-5b85-4b50-8108-893f5c667435@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-362827-linux-kernel-netdev=dewy.ruReferences:
<20261113-submit-phy-mii-reset-v1-v1-0-02a55f352a91@gmail.com> <11acd5b1-3099-4e3f-9fdf-a3c5c6f098c4@lunn.ch> <CADvTj4oPugtaeAXPvjJ10nhfKGDWTKbtALfuyF1+wUsHu2e90A@mail.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-362827-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 18:50:28 +0100 Organization: Usenet Network Message-ID: <ed79ced2-5b85-4b50-8108-893f5c667435@lunn.ch> References: <20261113-submit-phy-mii-reset-v1-v1-0-02a55f352a91@gmail.com> <11acd5b1-3099-4e3f-9fdf-a3c5c6f098c4@lunn.ch> <CADvTj4oPugtaeAXPvjJ10nhfKGDWTKbtALfuyF1+wUsHu2e90A@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1405707"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:+lfdsvl5o6jzIqu7JCtmPxPmF0U= sha256:HlXL1ScYr0RoeCJVLKDiVuyAlUfhd/9z6hjj15qSiWg= sha1:EzxZIOlkKIdRmx5MW7k0XpZh/1g= sha256:SE0K2HfqAUOevc/1Nyh2HbRqfYTWxknD014JFHrOn7Y= 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 1956A1145F0; Fri, 13 Nov 2026 21:26:01 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 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, URIBL_BLOCKED=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 oVZrVGMw1Wpd; Fri, 13 Nov 2026 21:25:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362827-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 3AFF41145D5; Fri, 13 Nov 2026 21:25:43 +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 A40F370004A; Fri, 13 Nov 2026 17:58:45 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1794592254; b=4TM3v3jxmBX0WAGWC7tEeJB/b3tg9AxUx/y8dB/0zer7AI9FhEMhK4uAJbx1wXbjTfKM LzfyM5/ew1Ph4QgGpU/LFMbGaftaVCCk+1fEgDpmqC2qNlrZF1upFsJWpEBnV9gfHyXdj 5Kfy5Z8L9RKC1/rw0aIYpPgXLKhhn9ubGOoEPW2isMY/0a58DYUdEJzWK6WMRoTPYozBw 5jKSQxS5e3rzIIFRchlb9grcGdvsltnP9dPFyWi/3BftjNaE4ualvz5vVOphLjV9Hz+Dz Nh5uioGVCbY91XvYO71IHURUnl+NYSDVO5pRh8y/uhMmlTXF5ofM8wvoXRfUVM1P+mg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794592254; 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: Content-Transfer-Encoding:In-Reply-To; bh=/XZwdUYt8kBTSTypLeLIdIsqqmTJ/mEKW9zpO2/18h8=; b=KUKgNX1ElgWdK5Zcs3a5wnsYHIeVxZr3sOCNRCfBMFi8qrju066Hhfeepl4tBdy5rUHX BZ15crDC3eCt22X09lhquGuuedISgoY+f+wxRX8PnvE4tMU50RVjQBedX1M0QB4MF+nes zBxjhVoYecpcK5ZkpUy0Ke+Idfi7N+ZO7nHz++Ar2EAJQc6U1EmORI3T34dGInggP996t YCtJvlXry5MA1M2EDqcGxf/vPfir/ALn5o0Honhxq4PdEIL2HXV4aElbN6eTmQc7VE8NO EMsfcc5znMbk9xxgIZ3Qq1rqwFm77Nj7YVwtTKZBHeokeQ3uMoZvfK8g7bC6GKR3BIA== 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="n/wBjYRF"; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=fail 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 504DB607C35A; Fri, 13 Nov 2026 17:50:54 +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=n/wBjYRF 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=1794592253; b=yo02VjEEjBtGt326ChlkMFWVjTYqTCbewxoxx3YC3B4JFKmlonoKlJuPpdQXz8dGbd13 vd8MvPY0QvmgnHUByG3Wta0lnohRrEwbDImGrryGuy1oz18vPvaObYnz0Xc4J4ZRDE1Nz +BMxTTTzbp8FTevOpSwZFa91RwrdbDMgkygj7prNIMw1Sxynailgh7Z7EcwXRydkGDkz5 gt8EGBO0SnuUOZmSnPIvH527HMc+nPYSKc3uZV4Xcvmn/AV4MPL31JbhLvFbQA0U6j/8w uddQcqWdd8rMYJHJhdlQdNMGp68VBdM3lbwHr7UEQrHRpajnj9K0/xobZx63a+q2/Lg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794592253; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=/XZwdUYt8kBTSTypLeLIdIsqqmTJ/mEKW9zpO2/18h8=; b=pzI33AQQzK3fncv233OuOcS6ACH2AseWRetZpNqQpW4ROEwtz7fY7bkit8uHKrC+tufP wzu7RkANsU92u6HopLJ6ueKh4RDSHQQtjc04+1yJ9RmQ0RBnOmx0IAIzoCjPJ16N8dLAv 3+ozW4HuPGzEU/fBELM8t5v68+qlS98BxazFULAzmIR650AB4oUKBRkXfRPdAp3fyAbdP xHejYWhyVesEK9js5mWCrmobfrirkE+pnfB/QTFy0/tTSE4OCrCzyRsHVJFvTGvgdF7dC cljTz9ZFdHgtdBq8dKUMTiHypt2EVRK/8HZyjbgtB4CU+lcUVNd2dpzLA2cd5ecDnvA== 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="n/wBjYRF"; 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 E42CA606D483; Fri, 13 Nov 2026 17:50:52 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E42CA606D483 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-Transfer-Encoding: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=/XZwdUYt8kBTSTypLeLIdIsqqmTJ/mEKW9zpO2/18h8=; b=n/ wBjYRFFeVKgvrBwGQONrRUi0W6q1bfdcSbQmSkrvI/llQ9Yf4I0LyuhdUnp/YsBcMDbEmxKq/nq6/ moNU+9kaC/0GpocvsfhIEMVv2e2Oer2wgPYm4yHwRJDTfUtB5mCpzWd4OThAUdoR9lbmw6HH2R9lo ZNbIT8I8vnnwNk0=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xRvPw-00GKZw-SL; Fri, 13 Nov 2026 18:50:28 +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: <CADvTj4oPugtaeAXPvjJ10nhfKGDWTKbtALfuyF1+wUsHu2e90A@mail.gmail.com>