Re: [PATCH net v2] net: dsa: realtek: rtl8365mb: wait out the full chip reset time

From: Linus Walleij

Date: Tue Sep 08 2026 - 17:13:12 EST


On Tue, Sep 8, 2026 at 7:44 PM Stanislaw Pal <kuncy7@xxxxxxxxx> wrote:

> The reset bit clears well before the RTL8365MB/RTL8367S has finished its
> internal bring-up, so configuring it right away makes register writes to
> blocks that are not up yet get lost. The switch is then left half
> configured: the CPU port link comes up and the switch still transmits
> towards the CPU, but nothing the CPU sends is ever forwarded - no MIB TX
> counter moves on any user port, while the MAC reports every frame as
> transmitted without errors.
>
> The driver already documents the 1 s reset time the chip needs and polls
> with a 1 s timeout, but stops waiting as soon as the bit clears. Sleep
> out the remainder of that second instead, measured from the reset write,
> so the total wait stays at 1 s regardless of how long the poll took.
>
> Seen on a TP-Link Archer AX55 v1 (IPQ5018 + RTL8367S, 2.5G HSGMII trunk)
> on roughly three out of four boots. Unbinding and rebinding the driver
> always fixed it at runtime. With this patch: 6 out of 6 clean boots.
>
> Fixes: 4af2950c50c8 ("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC")
> Signed-off-by: Stanislaw Pal <kuncy7@xxxxxxxxx>

Interesting fix, with an interesting optimization of the reset
deadline. I like it.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij