mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: realtek: rtl8365mb: let the SerDes PLL settle after the data-path reset
@ 2026-09-07 19:19 Stanislaw Pal
  2026-09-09 12:08 ` Stanislaw Pal
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Pal @ 2026-09-07 19:19 UTC (permalink / raw)
  To: Linus Walleij, Alvin Šipraga, Andrew Lunn, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, Johan Alvarado, Mieczyslaw Nalewaj, Stanislaw Pal

The vendor DW8051 firmware waits ~98 ms after the BMCR data-path reset
(constant SGMII_TIMEOUT_98MS in Sgmii_Init[]) before any further SerDes
register access, giving the SerDes PLL and analog front-end time to
settle. Without the wait the SGMII link on the RTL8367S can come up
half-alive on cold boot: carrier up and RX passing traffic, TX
permanently dead (measured on a TP-Link Archer AX55 v1, IPQ5018).

Fixes: 0b577e2fe06c ("net: dsa: realtek: rtl8365mb: add SGMII support for RTL8367S")
Suggested-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Stanislaw Pal <kuncy7@gmail.com>
---
--- a/drivers/net/dsa/realtek/rtl8365mb_main.c
+++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
@@ -1408,6 +1408,14 @@ static int rtl8365mb_pcs_config(struct p
 	if (ret)
 		return ret;
 
+	/* The vendor DW8051 firmware waits ~98 ms after the data-path reset
+	 * (SGMII_TIMEOUT_98MS in Sgmii_Init[]) for the SerDes PLL and analog
+	 * front-end to settle before any further SerDes register access.
+	 * Without the wait the link can come up half-alive on cold boot:
+	 * carrier and RX fine, TX permanently dead.
+	 */
+	msleep(98);
+
 	/* Keep SGMII in-band autonegotiation disabled: the link parameters are
 	 * forced from rtl8365mb_pcs_link_up() instead.
 	 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-09 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07 19:19 [PATCH net] net: dsa: realtek: rtl8365mb: let the SerDes PLL settle after the data-path reset Stanislaw Pal
2026-09-09 12:08 ` Stanislaw Pal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®