From: Karl Mehltretter <kmehltretter@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Wei Fang <wei.fang@nxp.com>, Clark Wang <xiaoning.wang@nxp.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] net: phy: realtek: restore RTL8211F RGMII delays on resume
Date: Wed, 14 Oct 2026 05:36:59 +0200 [thread overview]
Message-ID: <20261014033659.95196-1-kmehltretter@gmail.com> (raw)
The RTL8211F-VD loses the RGMII TX and RX delay enable bits across a
software power-down. rtl8211f_config_init() programs these bits from the
PHY interface mode, but rtl821x_resume() only clears BMCR_PDOWN and waits
for the receive clock to stabilize.
On a BeagleV Ahead configured for rgmii-id, carrier and the negotiated
speed return after an interface close/open, but the receive path does not
work. At 100 Mbit/s no frames were received. At 1000 Mbit/s all 11
observed frames had CRC errors.
Program the delays again after the existing resume delay. rtl821x_resume()
handles RTL8211F and RTL8211F-VD, both of which use
rtl8211f_config_rgmii_delay() during initialization.
Tested on a BeagleV Ahead with an RTL8211F-VD at 100 and 1000 Mbit/s,
including close/open without a link partner.
Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
Hardware test results on BeagleV Ahead (RTL8211F-VD, rgmii-id):
baseline patched
100 Mbit/s close/open RX silent pass
1000 Mbit/s close/open 11/11 CRC errors pass
no-link close/open, reconnect 15/15 CRC errors pass
The patched kernel also passed bidirectional 1 MiB SHA-256 transfers at
100 and 1000 Mbit/s and eight consecutive 1000 Mbit/s close/open cycles,
all without RX CRC errors. An s2idle suspend/resume test passed on both
kernels and did not reproduce the bug.
Built with ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- LLVM=1.
drivers/net/phy/realtek/realtek_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 177b62a7b..c867e5213 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -1375,7 +1375,7 @@ static int rtl821x_resume(struct phy_device *phydev)
msleep(20);
- return 0;
+ return rtl8211f_config_rgmii_delay(phydev);
}
static int rtl8211f_resume(struct phy_device *phydev)
--
2.54.0
next reply other threads:[~2026-10-14 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 3:36 Karl Mehltretter [this message]
2026-10-14 12:05 ` [PATCH] net: phy: realtek: restore RTL8211F RGMII delays on resume Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261014033659.95196-1-kmehltretter@gmail.com \
--to=kmehltretter@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox