Article View: linux.kernel.netdev
Article #11088Re: dwmac-motorcomm: RX dies after long s2idle, only wrapper SYS_RESET recovers
From: Giuseppe Nespolino
Date: Wed, 04 Nov 2026 16:46
Date: Wed, 04 Nov 2026 16:46
68 lines
14689 bytes
14689 bytes
Answers are inline
Il giorno dom 30 ago 2026 alle ore 21:24 Yao Zi <me@ziyao.cc> ha scritto:
>
> Hi Giuseppe,
>
> Sorry for the late reply.
>
No worries.
[ CUT ]
> Sorry for not making me clear. I mean the state of OOB_WOL_CTRL right
> before motorcomm_resume() sets it would help, which would prove whether
> it's the case that some firmware or internal hardware logic
> automatically arms OOL WOL after suspend.
Sorry for the long silence, I struggled a bit to recollect data.
I built dwmac-motorcomm with a dev_info() dumping the wrapper registers
at four points: entry of the suspend callback, entry of
motorcomm_resume(), right after stmmac_pci_plat_resume() (i.e. just
before motorcomm_deassert_mdio_phy_reset() and motorcomm_init()), and
after motorcomm_init(). Ubuntu 7.0.0-42, real s2idle, four cycles in the
same boot: three came back fine, the fourth (31 minutes) broke RX.
OOB_WOL_CTRL MGMT_INT_CTRL0 INT_MODERATION EPHY_CTRL
suspend entry 0x00000001 0x00000000 0x00c800c8 0x00000075
resume entry 0x00000000 0x003f0000 0x00000000 0x00000001
before init 0x00000000 0x003f0000 0x00000000 0x00000001
after init 0x00000001 0x00000000 0x00c800c8 0x00000001
PMCSR already reads D0 at resume entry; SYS_RESET reads 0x80000001 at
all four points.
So yes, OOB WOL is armed when motorcomm_resume() runs, but on every
resume, not only the failing one: the whole wrapper comes back with what
look like its post-reset defaults (0x003f0000 is exactly what I read
right after a SYS_RESET in August). An earlier pm_test=devices cycle left
these registers intact, so the state loss only happens in a real s2idle.
The failing cycle is byte-identical to the three good ones at all four
points, including after init: the DIS write lands and the masks are
cleared, yet interrupts stay dead (MGMT_INT_CTRL0 then latches 0x11,
mmc_rx_framecount_gb grows while rx-0/tx-0 don't). So these registers
don't tell a good resume from a bad one.
That matches another result I owe you: on 1 Oct I put a naturally broken
controller through a second 60s s2idle before recovering it, and that
resume did not fix it, whereas the same resume does recover a controller
where I armed OOB WOL by hand on a healthy link. So the natural failure
doesn't look like "OOB WOL left armed"; something the resume path
doesn't touch stays wedged, and only SYS_RESET clears it.
I think that still argues for the patch: the device comes out of s2idle
in a reset-like state nobody commanded, and resume never performs the
explicit reset + init sequence that probe does. I'll send it as you
suggested, with the usleep_range() folded into motorcomm_reset(). With a
single natural failure captured so far I can't claim more than that it
recovers the stuck state; I'll keep the instrumented module loaded and
report back.
As before, the analysis was done with an AI assistant; all numbers come
from this machine.
Thanks,
Giuseppe
Technical Details
Message-ID:
<CAKx9m6MMTVg0WQXVwQurT+ZaPfmYkaXV8reOJzLuYR=gA4s+vA@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-356610-linux-kernel-netdev=dewy.ruReferences:
<CAKx9m6PywVwkirvkAtz144c-yg71c2+OcNYOTM4Bjtd8dF2PaA@mail.gmail.com> <CAKx9m6OsGKGKGxPnjwy8U-bDyvXVEK-dVNmvP0ZqSL-t2Exsgg@mail.gmail.com> <anziUH_cC1LXoB1x@pie> <CAKx9m6OMQKufDpqGJewG1OyvZGBKGimSxxxGRDGWgFicSRoTGQ@mail.gmail.com> <apSDPwF49Z1Zd0kJ@pie>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-356610-linux-kernel-netdev=dewy.ru
From: g.nespolino@gmail.com (Giuseppe Nespolino)
Newsgroups: linux.kernel.netdev
Subject: Re: dwmac-motorcomm: RX dies after long s2idle, only wrapper
SYS_RESET recovers
Date: Wed, 4 Nov 2026 17:46:31 +0100
Organization: Usenet Network
Message-ID: <CAKx9m6MMTVg0WQXVwQurT+ZaPfmYkaXV8reOJzLuYR=gA4s+vA@mail.gmail.com>
References: <CAKx9m6PywVwkirvkAtz144c-yg71c2+OcNYOTM4Bjtd8dF2PaA@mail.gmail.com>
<CAKx9m6OsGKGKGxPnjwy8U-bDyvXVEK-dVNmvP0ZqSL-t2Exsgg@mail.gmail.com>
<anziUH_cC1LXoB1x@pie> <CAKx9m6OMQKufDpqGJewG1OyvZGBKGimSxxxGRDGWgFicSRoTGQ@mail.gmail.com>
<apSDPwF49Z1Zd0kJ@pie>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="3433326"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6luJI5bsK+kSDq6urrPfV79k6wc= sha256:ZI+aL2Y09CcnU09GNXJNcusIX/ZoBGISfOvvALvAWnw=
sha1:v2MAStl8ZcAVbixY2fDXoqguicA= sha256:Yh+Xllr99KIVdYSKzfaaJ+V7ex28wKHZOVtbyoGc+TQ=
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 88097112C73; Wed, 4 Nov 2026 19:51:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
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 (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 Gs_Y5PJKSJP5;
Wed, 4 Nov 2026 19:51:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-356610-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 080A8112C6D; Wed, 4 Nov 2026 19:51:37 +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 D28C460F35A; Wed, 4 Nov 2026 16:47:34 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793810806;
b=5hdRJlEhJmMHtv03Xc0KTjebmXSCi9sjB889arde6n/N2yPoUN3amhcxygyimvGtcUoe
ms/hLfxGd5Wxe9rp9LljAXofDF6/+LQy0PMjbat3qyfsdNsb9TJwztm+jpsW79fZqSHTQ
ArPZdL9RfQpmv1Lk6XqterMbg0aUT/8VkEM9EfVeH81SEqLAp6IZzwXUi4FaxwaAAGmbg
s4lB3+9mWs+j9nrIDIpCHlfqaPuKuTiaDZs9aKooWD36qqPOyagn0Ukx6fpYDSCxPHy4T
z+1p/7cP2JgIZIs0ODJLE9FmHhwMGfNDa/Qy+vAT5J1B670UMLmzeqFqd3AcR0urBQg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793810806;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type;
bh=xW8Hgn0qnZIeMrCgDDMj8in7eDtwrUG9nG8ML12gUO0=;
b=J7bHT3unoSNgUj3YMF6uBGautQrAHtYnRtVwxDnQRv+wh+O4dn6s4YfCz/ySQuuEsltI
mR+U/pQyBStPbY0NHyFqNuTHhYxoIcwEql7e3kjrZjjl4N5wrSDzl8uZhAleqDc2tQ12I
zQZWJEfKc47lJc61XYKiZs1uZTYXG7anerqMr9mlCeK3IQImM8Qk9aq7Bk1eNxq1EJ3VU
x0mi2A8EbWvMCQf0trZKhNpIWEXPXJW/A+XCYAb4AZ1heB82Lwcb83pMEnbrys1NHhfDE
xMwWwQwhxxkczzZr6FNiPpzeaUwP+g/guFVl59vXcuyINPWhBY0YKz4gxclpzjHs/yg==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=y0e9JUYS;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
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 36987606EE8B;
Wed, 4 Nov 2026 16:46:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=y0e9JUYS
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.46
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793810805;
b=AOPjyOQJb7Amgz1QW0nn91u6vINCPmoz4+XMp0+pMJHjsxEI2Ft3bni+dNyaqzseUmP5
XnqW2goZpGyJxdqdBnA5X8/w3Dx5gglInMjHH2oOQ+Y/+rFSxur3HNo3bVp9bIAL2lITL
ww8qYrVJMr1BDtRB3LHjYX8nfthnDxO6zrpdw+1BAuCe3iwj3kvn71gMWNMyY3QX1pbYx
6Xv8Su8DqpfKs+0RrEkQGCU6JtR9HyZnJbTJO3wBwj4duLCqiIFjafLl+eDSZDZ+YhNKF
kP7klAHLV2tZQSs10/Yf3PoxlonnmDKdPtrXxcl6/gM62C64f3z67H96tjEhCsFZqfA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793810805;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type;
bh=xW8Hgn0qnZIeMrCgDDMj8in7eDtwrUG9nG8ML12gUO0=;
b=uglhrcif0yvOsCvSA99vmbsDUmTeIYr/mfHltShB7eRVwpaP6P1SeTxkixVMoggBe8gS
GjmpDOSbZKU56kwjkPxbrnpkgMApcuYgbiAHEHnJgC/JxzrsJwdHhbXMWWV1masikWLfH
kfCSDnWQVGpGXc+CDirTHr+Wrjj6VUhiMFNhg6mYZMObmXTKDjUBckgwCVqK6XoRCa1Sf
FjC3CNGsgH9ie34ITL0hVpHFbCyf9MCp1D94ZL8NPguLu/XndRWf7iRIZ69wldT5bu8rp
kakE1j4wtR4PIPjrjWThAuABgS2+SQO418rlchfb24kAKGI3yigkdeXcAdlxlrmuifg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=y0e9JUYS;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.46
X-Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0194C606A328
for <netdev@vger.kernel.org>; Wed, 4 Nov 2026 16:46:44 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0194C606A328
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-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4a20a37703bso7158825e9.1
for <netdev@vger.kernel.org>; Wed, 04 Nov 2026 08:46:44 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1793810803; cv=none;
d=google.com; s=arc-20260327;
b=mM2xDUjQpYpojPHxeDWhWclpjvikcgRgqbyW/GgFT2DKUQaKbQzNYw7r5DFy5DF+TA
ACD/zOxdthnl/ZRQEGdLMo/SeGMoNp77XeM9VuQCBJhjbXH5yfMvXcrfjR/6oZLVZc1i
5obyeymM6IVxJOy/KGyN8TXcT8t3uVwxs+61N/f0qRLyPRORTvuJnl493XasA+Ox6w9K
Iz1omFaD6SzEW9EhW3mnzD9b5a2OKJifadoVZ+EZwUGsFcLTTj2vgnXBo8duinC9X55Q
RhcPyhS4TTQApejimo+yeN0pzewQU+tD32SzFg2MNFbbbSMYmy3G6vMAvy3FSlLUADwA
tAMQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:dkim-signature;
bh=xW8Hgn0qnZIeMrCgDDMj8in7eDtwrUG9nG8ML12gUO0=;
fh=GJDOkJGMPhVedBW4znRBBLZnIkPYpiu96hIit20RvTE=;
b=c3+0M6UfvSd57ygk6us8C3Q0Zkni/C2Slhob1xBkh709+M4xnfTxn9I+qxMh0ee50o
WL1/rMv4agmoGd+ENHUGU8QPOWBEsJ9TnlPiZb8JUPNx7KtItv22nvFFicbXUSngCTkV
Qo71iyQnSQhV78LQVzM73TH74PUL0onxBrr5GYyPvvqp8B8rtPkxa+of2TtW9KK2JOr1
OYaWyIFqRzrtPRyY7rqu8ugdwPRuc7vLFhD/1Zx3t+Rso/D1oMMHZOUb0NmXtEbZP7k0
wS5pla19z6I6j67Ze/v1wrIthmKXsc8xX3GJiuRCz3vUdSt85nURzBvMypha1JJ8Vd+H
MTTg==;
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=20260707; t=1793810803; x=1794415603; darn=vger.kernel.org;
h=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=xW8Hgn0qnZIeMrCgDDMj8in7eDtwrUG9nG8ML12gUO0=;
b=y0e9JUYSaUDBVvZ2e4FCtN4PphH4PhbUxTOvAqu1Yiwdw9J9JEw6UnDYeYAIMwHoTK
q45hOs1zbGNPwzM7UlU4DiOgI74AA/XdJIvYogHT0fh5TuFGeS/LR//NOt77ARAngyAu
WAann/dvzBCgMG6387hsiEo6pK+5LVVZfNQMSvVytJikApONJ/IL15cXX31eaVWe7AIv
GAt4bl3SsPssyfcWFsBOdl1wE6a4OXeb2kaJ2DszQMhKhsXtRMdzxW9iEwuDg4EPXyxa
bENBVm0zYvwx4MSWjeFlrTVgcVgxSFk/F2tH6ZdOOpiHJt0trZf/zdgME6VyJTj+OAkz
F0wQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793810803; x=1794415603;
h=content-type:cc:to:subject:message-id:date:from:in-reply-to
:references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
:subject: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a05:600c:83c5:b0:4a1:88de:9e8b with SMTP id
5b1f17b1804b1-4ac17191074mr340156395e9.5.1793810803211; Wed, 04 Nov 2026
08:46:43 -0800 (PST)
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: <apSDPwF49Z1Zd0kJ@pie>
X-Gm-Features: AclHuK9_yja2JGAKkLua79AIy7He68jvu-sXCLEGjHXqKKP-0aST3GQ2LevbB2Y
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org