Article View: linux.kernel.netdev
Article #3298Re: [PATCH net v2] net: phylink: allow stopping a suspended instance
From: James Hilliard
Date: Wed, 14 Oct 2026 17:07
Date: Wed, 14 Oct 2026 17:07
68 lines
12376 bytes
12376 bytes
On Wed, Oct 14, 2026 at 10:02 AM Andrew Lunn <andrew@lunn.ch> wrote: > > On Tue, Oct 13, 2026 at 01:46:24PM -0600, James Hilliard wrote: > > On Mon, Oct 12, 2026 at 7:22 PM Andrew Lunn <andrew@lunn.ch> wrote: > > > > > > On Mon, Oct 05, 2026 at 01:09:05PM -0600, James Hilliard wrote: > > > > After a failed MAC resume, a driver must be able to stop phylink without > > > > resuming it and reconfiguring the failed MAC. This is needed when recovery > > > > leaves the interface administratively up but detached until a subsequent > > > > down/up: ndo_stop() must finish the suspended phylink lifetime even though > > > > the MAC could not be restored. The missing transition was identified by > > > > code inspection of the stmmac recovery paths. > > > > > > I don't particularly like this. It feels like a workaround for a > > > broken MAC. It would be better to fix the MAC so that resume does not > > > fail. > > > > Fixing an identified cause of resume failure belongs in the MAC > > driver. The intended purpose here is narrower: allow orderly shutdown > > after the driver has returned an error, rather than recover the MAC > > through phylink. > > > > stmmac_resume() already returns before phylink_resume() when hardware > > setup fails. > > But why did the hardware setup fail? The exercised failure was injected, rather than a diagnosed spontaneous MAC fault. This change comes from auditing the existing error paths for the deferred stmmac recovery fix. > This is what i mean about it being a workaround. The deferred fix addresses a separate software failure: suspend has already disabled NAPI, but an unsuccessful resume leaves the interface administratively up. Closing it can then disable NAPI again and hang. The recovery changes preserve resource ownership so administrative down can finish and a later open can retry initialization. That shutdown also has to finish the suspended phylink lifetime. Without MAC WoL, suspend has already stopped phylink, although prepare_resume() may have powered the PHY back up. With MAC WoL, link-down was deferred and the MAC_WOL disable bit remains set. Suspend-owned advertisement changes also need restoring. Those are phylink-owned states. Avoiding the second NAPI disable in stmmac does not resolve them, and calling phylink_resume() just to permit shutdown would reconfigure the MAC after its setup failed. The required operation is therefore to terminate the suspended instance without bringing it back into service. Cleanup must not depend on first succeeding at the initialization that failed. The original resume error remains an error, and an identified MAC/PHY sequencing defect still needs its own fix. This transition addresses the subsequent shutdown failure; it does not hide or work around the cause of the unsuccessful resume. > Andrew >
Technical Details
Message-ID:
<CADvTj4pVtoMh=H=nJJaPxYf-ZqU8xJEJLMANUAXTFJWb5zBe-g@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346353-linux-kernel-netdev=dewy.ruReferences:
<20261005-submit-phylink-suspended-stop-v1-v2-1-8b8e5d53dfc2@gmail.com> <224296ea-f196-44f3-91d6-1461846c55a5@lunn.ch> <CADvTj4qgcXE6azsNx-Wg5afatezLeuctGR607qO1WhZSmuqzBg@mail.gmail.com> <7ffb9b38-75e1-42e2-86e2-21a1666fc51f@lunn.ch>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346353-linux-kernel-netdev=dewy.ru
From: james.hilliard1@gmail.com (James Hilliard)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] net: phylink: allow stopping a suspended instance
Date: Wed, 14 Oct 2026 11:07:27 -0600
Organization: Usenet Network
Message-ID: <CADvTj4pVtoMh=H=nJJaPxYf-ZqU8xJEJLMANUAXTFJWb5zBe-g@mail.gmail.com>
References: <20261005-submit-phylink-suspended-stop-v1-v2-1-8b8e5d53dfc2@gmail.com>
<224296ea-f196-44f3-91d6-1461846c55a5@lunn.ch> <CADvTj4qgcXE6azsNx-Wg5afatezLeuctGR607qO1WhZSmuqzBg@mail.gmail.com>
<7ffb9b38-75e1-42e2-86e2-21a1666fc51f@lunn.ch>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2341174"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ocv9FtZr9kuIMAZaUB9IkvRALqM= sha256:sGkgLD7lLvfMQoI8+TPGjZzd3gellHpJK6ERYZAQCQk=
sha1:639v0h+9oeaFP62MhMgI6A+jBcY= sha256:ldAMwrPxVl2X/uzv2gpcvHVG4i0t0GN2Oe4a46EkPdY=
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 B993611017B; Wed, 14 Oct 2026 20:12:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: 0.252
X-Spam-Status: No, score=0.252 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, FORGED_GMAIL_RCVD=1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.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 gjyi9Ck2afqS;
Wed, 14 Oct 2026 20:12:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346353-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 05279110176; Wed, 14 Oct 2026 20:12:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 2667D25200; Wed, 14 Oct 2026 17:07:45 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D22424EB865;
Wed, 14 Oct 2026 17:07:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mrEYySNs"
X-Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 602CF4CE690
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 17:07:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.208.51
X-ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791997664; cv=pass; b=UuF0BWE6rNaJu3tE4w87a+EbqgmCpH2VZDN8uRwdP6wyvwpQPBdIMh1KxcwwofOlBna7ZqCdcqVq2IEHSmEEAEEbl9NAs/6BY3iv+KHctO5gVsHHMKwmVPH3qLe7nNp0+/e5T1cDIDEivBVMvhbyxV7MSTg1asWPsFKhbQGVba4=
X-ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791997664; c=relaxed/simple;
bh=mqlHJeBfyTwlYUc3NbiaMm0Dt0eUNRbSZnH5mzrwXDU=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=nEU5/PW/i705BiTGQRXCObC15i9R3xAo78l0FbDuPeIjNaAO6Uv7Ke3Qd1HCMOsARRdpEnIWd9eDlAf2rmQRGB6PjP0hqcvJXuzs08vAVGosFCl33EO97DCroJXv+EPLoE3sp4IATFbykAkfSYc/wzdA7/wVXC4hu1Wbs/HUDUE=
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mrEYySNs; arc=pass smtp.client-ip=209.85.208.51
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6acb9c018ffso7114639a12.1
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 10:07:43 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1791997661; cv=none;
d=google.com; s=arc-20260327;
b=W2ROs9ERlzRDNYVhWQzpKj444r1efzER/cgx1Le1a7LiRPhr0Joc55XRed5pmOCQZ6
7HltdRD5a0HJqSXh1P8vdODUX8GLDV3hn0G7JHbOBwSAGUspQ+5lBAtZ2LX++0dg33us
1FlmjWpQGCyikWp5HhgN1dlPTy89PzvvxCEvNpCSfLDn9xY2NxZGx3Eog2Mr3t+SY0JX
o7v1oKb19SZnl+SBMw9RUxaWpOpt4BM629wnxYMCPOwdcXMz7EoRg9tPu6gGwk3DDBTy
L+cO0PYatrmU2iXkfJbre80YufEGSlh7/JLdQmmnU0UdgfHgGtKpmlP51Llw0str3iLp
t++A==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=sdFd3r41M7yyc6N2ofKUYBcOXWgEzV7hB2FeJ/0r1mQ=;
fh=zT239D3uluY0S4SaxSt6v9qsARJBm0AH8ZIzY6AOLC8=;
b=g1UB+AM4+rXpXNExAl/xkaJphcUoq1hkR780/vXR5jUJrnbHVbvcZ2YW7IMzG6vrfT
jVQ1OOm3rntmhhP+cpgi0rGbyMmPavakwFZAV24TpVvjrmFNQm4QKvq/z0MleEM7lS9q
Jg+R9QEvkZcVTtY/0SC4n0fzKEwu6soxlqbdkmF1OFk9IGAMRU7JURE4qoa/Zd33jVMi
bNGlf2AfhStjtFYlqcXnFzjv/ouXPyKXC2P39uxlPHiZPgQ1N18nw7Vpcu/9rpiobhdK
PbAtnpy+MhloJeUI0xEoufkPmvpsQffxl1+qOps9BVKR4WEykAr/T75Zy8jCIHbkzfH8
rAXA==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1791997661; x=1792602461; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=sdFd3r41M7yyc6N2ofKUYBcOXWgEzV7hB2FeJ/0r1mQ=;
b=mrEYySNsWseLC2l+53rWTlhw76X+YIL5ycc5vq0799t+s6A2x9vDqXVd9VqDf1FEy/
pnZpRIrts8tgLvUaCfJWhkn6oEE8u8+3Eoe8PdFt8BP0/VHtDLTW8reB4uMoRt4DkzbD
rUqP2G6xntA4N08A6CagNg+W73HGGEC0SpREw1oVo+SlI1q6TTPvR60ntSLIUK+d3NHg
pDfzIlC3Au4QYu7R04VGC/FH0ajG4Qqw5xPzJ5SXsxlclq6JB93IxHHdBqqpNi3DUaVk
3uyFZtd+DS/dKtimIlCO4gbQv0+rjL7Y0ykxr965BDomvtPVW/LMa//WnN8dM+Jq4l65
2PCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791997661; x=1792602461;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-g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HGSnm9G4/OaR/zYnkW0uleLaWb2z+7qulSPH2VWh9
X-Received: by 2002:aa7:cf16:0:b0:6a9:9a0e:e05f with SMTP id
4fb4d7f45d1cf-6b17ae26000mr9090745a12.2.1791997661286; Wed, 14 Oct 2026
10:07:41 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <7ffb9b38-75e1-42e2-86e2-21a1666fc51f@lunn.ch>
X-Gm-Features: AclHuK8jlqpg-qIbwAqpxCbEEkIemf37SHQz8CwDLoD9nKTqJNXJIwBV8qcy8Jo
X-Cc: netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>, linux-kernel@vger.kernel.org