mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanislaw Pal <kuncy7@gmail.com>
To: Johan Alvarado <contact@c127.dev>
Cc: Mieczyslaw Nalewaj <namiltd@yahoo.com>,
	alvin.sipraga@analog.com, gabonpivovich@gmail.com,
	linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com,
	kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com,
	maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, gusfmora@gmail.com,
	fabianotassotti@gmail.com
Subject: Re: [PATCH net-next v9 08/11] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes
Date: Wed, 11 Nov 2026 16:21:58 +0100	[thread overview]
Message-ID: <20261111152158.467255-1-kuncy7@gmail.com> (raw)
In-Reply-To: <b68807e4-1470-4f4b-8975-e8a70dffd011@c127.dev>

Hi Johan,

On Tue, Nov 10, 2026 at 12:49:04AM -0500, Johan Alvarado wrote:
> Oleg, could you check this on the AX55 before the first ifup of the
> conduit? A single register read tells:
>
>   devmem 0x98218    # UNIPHY MISC2: 0x70 = SGMII, 0x50 = SGMII+

I can't answer for Oleg's unit. Mine is an Archer AX55 v1 with an
RTL8367S, family C like your MR80X v2, so this is a second family C
board, not the family D answer.

That image has no /dev/mem, so I printed MISC2 and MODE_CTRL from
qca-uniphy instead: at probe, around your preconfig, and before and
after every pcs_config(). On every boot, warm and cold, probe reads
MISC2 0x70 and MODE_CTRL 0x421. Without your commit, SGMII+ (0x50,
0x821) shows up at the first pcs_config(), at about 7.4 s, while the
switch configures 2500base-x at about 5.0 s.

One note on the values. In the pcs-qca-uniphy table, MISC2[6:4] = 7
(0x70) is the USXGMII value; SGMII is 0x30 and SGMII+ is 0x50, as
FlyFish-go pointed out on an RC3000 v3 [1]. MODE_CTRL says the same as
your reading, though: 0x421 has SGMII_MODE (bit 10) set and 0x821 has
SGPLUS_MODE (bit 11). So the hand-over is SGMII either way, and 0x70 in
MISC2 is just not what tells it. On his board, MISC2 reads 0x70 after
the boot loader's block reset when U-Boot runs no network command, and
0x30 after a U-Boot ping.

Reboot loop on our OpenWrt tree (6.18, dwmac-ipq5018 + qca-uniphy), with
the OpenWrt ordering patch removed in both images. A boot counts as
broken on ping loss to a host on lan1, or FCS errors or PAUSE frames on
CPU port 6.

- Without your commit: 2 of 15 broken.
  - In one, the switch sent PAUSE frames to the CPU (1368 on port 6) and
    to lan1, and almost nothing got through. No FCS errors.
  - In the other, frames from lan1 reached the CPU, but nothing from the
    CPU went out on lan1, although port 6 ifInOctets kept counting. No
    FCS errors, no PAUSE frames.
  In our tree the conduit is closed and opened again at about 26 s
  (pcs_config() runs again, the UNIPHY already in SGMII+), and that
  didn't cure either boot. This fits your note that a re-sequence on the
  SoC side does not help.

- With your commit: 0 of 23 broken (20 reboots, 3 power cycles). The
  preconfig puts the UNIPHY in SGMII+ at about 2.1 s, 3.2-3.3 s before
  the switch configures its port, and pcs_config() at open finds the
  mode already set.

2 of 15 against 0 of 23 is weak on its own, but it points the same way
as your 18 of 51 against 0 of 32. In the same thread [1], FlyFish-go ran
the RC3000 v3 (RTL8367S, family C) at 2500base-x with only the OpenWrt
ordering patch removed: 4 of 7 cold boots broken, against 0 of 5 with
it. In every broken boot the SoC-to-switch direction was the one that
failed.

I have put the same result on your OpenWrt PR [2].

Tested-by: Stanislaw Pal <kuncy7@gmail.com> # Archer AX55 v1

[1] https://github.com/kuncy7/openwrt-nss-edma/pull/73#issuecomment-6796451511
[2] https://github.com/openwrt/openwrt/pull/26597

Best regards,
Stanislaw

  parent reply	other threads:[~2026-11-11 15:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9b73858d-fc09-4988-8bab-fd7b88db9412.ref@yahoo.com>
2026-11-08  8:04 ` [PATCH net-next v9 00/11] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08  8:05   ` [PATCH net-next v9 01/11] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08  8:06   ` [PATCH net-next v9 02/11] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-08 14:20     ` Linus Walleij
2026-11-09  8:52     ` netdev-bot+sashiko
2026-11-08  8:07   ` [PATCH net-next v9 03/11] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-08  8:08   ` [PATCH net-next v9 04/11] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-09  8:52     ` netdev-bot+sashiko
2026-11-08  8:09   ` [PATCH net-next v9 05/11] net: dsa: realtek: rtl8365mb: set and get vlan 4k " Mieczyslaw Nalewaj
2026-11-08  8:10   ` [PATCH net-next v9 06/11] net: dsa: realtek: rtl8365mb: use raw VID for PVID on " Mieczyslaw Nalewaj
2026-11-08  8:11   ` [PATCH net-next v9 07/11] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-11-09  8:52     ` netdev-bot+sashiko
2026-11-08  8:11   ` [PATCH net-next v9 08/11] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes Mieczyslaw Nalewaj
2026-11-08 19:13     ` Johan Alvarado
2026-11-08 20:53       ` Mieczyslaw Nalewaj
2026-11-10  5:49         ` Johan Alvarado
2026-11-10  9:33           ` Alvin Šipraga
2026-11-10 11:22             ` Mieczyslaw Nalewaj
2026-11-11 15:21           ` Stanislaw Pal [this message]
2026-11-08  8:12   ` [PATCH net-next v9 09/11] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-08  8:13   ` [PATCH net-next v9 10/11] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-11-09  8:52     ` netdev-bot+sashiko
2026-11-08  8:14   ` [PATCH net-next v9 11/11] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-08 14:21     ` Linus Walleij

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=20261111152158.467255-1-kuncy7@gmail.com \
    --to=kuncy7@gmail.com \
    --cc=alvin.sipraga@analog.com \
    --cc=andrew@lunn.ch \
    --cc=contact@c127.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fabianotassotti@gmail.com \
    --cc=gabonpivovich@gmail.com \
    --cc=gusfmora@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luizluca@gmail.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=namiltd@yahoo.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®