* [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot
@ 2026-11-27 13:15 Juraj Sladek via B4 Relay
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
2026-11-27 13:15 ` [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after " Juraj Sladek via B4 Relay
0 siblings, 2 replies; 10+ messages in thread
From: Juraj Sladek via B4 Relay @ 2026-11-27 13:15 UTC (permalink / raw)
To: Linus Walleij, Luiz Angelo Daros de Luca, Alvin Šipraga,
Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev, Juraj Sladek
On the TP-Link Archer AX55 v1 (Qualcomm IPQ5018, RTL8367S on port 6 over
a 2500base-x/HSGMII fixed link to the IPQ5018 GMAC), wired networking is
dead after a significant share of boots, which OpenWrt users of the
device have been working around with power cycles.
Two different failure modes show up, both on the CPU to switch direction:
- every frame from the CPU is received by the switch with an FCS error;
patch 1 fixes this by resetting the SerDes data path again once the
conduit is up and the link partner transmits;
- frames from the CPU are received fine but never forwarded (or
forwarded corrupted); patch 2 fixes this with a switch core soft
reset a few seconds after the conduit comes up.
The root cause of the second mode is unknown to me. The vendor driver
does not use SW_RST; it does load and start firmware on the embedded
DW8051 for the HSGMII link, which this driver deliberately keeps in
reset, so the firmware may be what normally covers this. If anyone at
Realtek or with documentation can explain what PORT_DEBUG_INFO_CTRL3
(0x091A) reflects, or a more targeted reset, I am happy to test it.
Things I could not verify: whether SW_RST clears the hardware L2 table
(the static FDB entries programmed for the CPU port); traffic and the
VLAN-aware bridge setup keep working after it. Only the HSGMII case on
the IPQ5018 was tested; SGMII uses the same code path.
Test details are in the commit message of patch 2.
Signed-off-by: Juraj Sladek <juraj.sladek@littleit.sk>
---
Juraj Sladek (2):
net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
net: dsa: realtek: rtl8365mb: soft reset switch core after conduit comes up
drivers/net/dsa/realtek/rtl8365mb_main.c | 116 +++++++++++++++++++++++++++----
1 file changed, 103 insertions(+), 13 deletions(-)
---
base-commit: 28a371228d4eb4857cc31eeb1a0d7d01e9c3ea2f
change-id: 20261127-rtl8365mb-hsgmii-fix-eb9bd1d0dd87
Best regards,
--
Juraj Sladek <juraj.sladek@littleit.sk>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-27 13:15 [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot Juraj Sladek via B4 Relay
@ 2026-11-27 13:15 ` Juraj Sladek via B4 Relay
2026-11-27 23:09 ` Mieczyslaw Nalewaj
2026-11-28 13:21 ` netdev-bot+sashiko
2026-11-27 13:15 ` [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after " Juraj Sladek via B4 Relay
1 sibling, 2 replies; 10+ messages in thread
From: Juraj Sladek via B4 Relay @ 2026-11-27 13:15 UTC (permalink / raw)
To: Linus Walleij, Luiz Angelo Daros de Luca, Alvin Šipraga,
Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev, Juraj Sladek
From: Juraj Sladek <juraj.sladek@littleit.sk>
The SerDes of the external interface is configured from phylink long
before the conduit Ethernet controller starts transmitting on the link.
On a TP-Link Archer AX55 v1, where the IPQ5018 GMAC is connected to port
6 of an RTL8367S over a 2500base-x (HSGMII) fixed link, the SerDes
receiver regularly comes out of this in a state where every frame
received from the CPU is counted with an FCS error, so the CPU port does
not work at all until the switch is reset.
rtl8365mb_pcs_config() already resets the SerDes data path right after
taking the SerDes out of reset. Repeating that reset once the link
partner actually transmits recovers the receiver, so factor it out and
call it again from the .conduit_state_change() callback when the conduit
becomes operational.
Fixes: 987137345f33 ("net: dsa: realtek: rtl8365mb: add HSGMII support for RTL8367S")
Signed-off-by: Juraj Sladek <juraj.sladek@littleit.sk>
---
drivers/net/dsa/realtek/rtl8365mb_main.c | 66 +++++++++++++++++++++++++-------
1 file changed, 53 insertions(+), 13 deletions(-)
diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
index da06f952a..54d90121e 100644
--- a/drivers/net/dsa/realtek/rtl8365mb_main.c
+++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
@@ -858,6 +858,7 @@ struct rtl8365mb_port {
* @pcs: PCS for the SerDes external interface
* @sds_supported: SerDes tuning parameters match the chip option, so the
* SerDes interface modes can be advertised
+ * @sds_in_use: the SerDes external interface has been configured
*
* Private data for this driver.
*/
@@ -870,6 +871,7 @@ struct rtl8365mb {
struct rtl8365mb_port ports[RTL8365MB_MAX_NUM_PORTS];
struct phylink_pcs pcs;
bool sds_supported;
+ bool sds_in_use;
};
#define pcs_to_rtl8365mb(_pcs) container_of((_pcs), struct rtl8365mb, pcs)
@@ -1380,6 +1382,24 @@ static int rtl8365mb_sds_raise_rate_limits(struct realtek_priv *priv)
RTL8365MB_PORT6_EGRESSBW_CTRL1_MASK);
}
+/* Reset the SerDes data path and resync its PLL, mirroring what the vendor
+ * firmware does right after deasserting the SerDes reset. This flushes the
+ * FIFOs and ensures a clean state for the link, preventing silent drops and
+ * CRC errors.
+ */
+static int rtl8365mb_sds_reset_datapath(struct realtek_priv *priv)
+{
+ int ret;
+
+ ret = rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_BMCR,
+ RTL8365MB_SDS_BMCR_DPRST_PHASE1);
+ if (ret)
+ return ret;
+
+ return rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_BMCR,
+ RTL8365MB_SDS_BMCR_DPRST_PHASE2);
+}
+
static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
phy_interface_t interface,
const unsigned long *advertising,
@@ -1467,18 +1487,7 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
if (ret)
return ret;
- /* Reset the SerDes data path and resync its PLL, mirroring what the
- * vendor firmware does right after deasserting the SerDes reset.
- * This flushes the FIFOs and ensures a clean state for the link,
- * preventing silent drops and CRC errors.
- */
- ret = rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_BMCR,
- RTL8365MB_SDS_BMCR_DPRST_PHASE1);
- if (ret)
- return ret;
-
- ret = rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_BMCR,
- RTL8365MB_SDS_BMCR_DPRST_PHASE2);
+ ret = rtl8365mb_sds_reset_datapath(priv);
if (ret)
return ret;
@@ -1492,7 +1501,13 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
val &= ~RTL8365MB_SDS_NWAY_EN_MASK;
val |= RTL8365MB_SDS_NWAY_RESTART_MASK;
- return rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_NWAY, val);
+ ret = rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_NWAY, val);
+ if (ret)
+ return ret;
+
+ mb->sds_in_use = true;
+
+ return 0;
}
static bool rtl8365mb_interface_is_serdes(phy_interface_t interface)
@@ -3079,6 +3094,29 @@ static int rtl8365mb_reset_chip(struct realtek_priv *priv)
20000, 1e6);
}
+/* The SerDes is configured from phylink long before the conduit Ethernet
+ * controller starts transmitting on the link, so its receiver initially locks
+ * on an idle line. On an RTL8367S connected to an IPQ5018 over HSGMII this
+ * regularly left the switch receiving every frame from the CPU with an FCS
+ * error. Reset the SerDes data path again once the conduit is up.
+ */
+static void rtl8365mb_conduit_state_change(struct dsa_switch *ds,
+ const struct net_device *conduit,
+ bool operational)
+{
+ struct realtek_priv *priv = ds->priv;
+ struct rtl8365mb *mb = priv->chip_data;
+ int ret;
+
+ if (!operational || !mb->sds_in_use)
+ return;
+
+ ret = rtl8365mb_sds_reset_datapath(priv);
+ if (ret)
+ dev_err(priv->dev, "failed to reset SerDes data path: %pe\n",
+ ERR_PTR(ret));
+}
+
static int rtl8365mb_setup(struct dsa_switch *ds)
{
struct realtek_priv *priv = ds->priv;
@@ -3093,6 +3131,7 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
cpu = &mb->cpu;
mb->pcs.ops = &rtl8365mb_pcs_ops;
+ mb->sds_in_use = false;
/* The SerDes has no link interrupt wired up, so phylink must poll the
* PCS for link changes when it tracks the link through pcs_get_state()
@@ -3414,6 +3453,7 @@ static int rtl8365mb_set_mac_eee(struct dsa_switch *ds, int port,
}
static const struct dsa_switch_ops rtl8365mb_switch_ops = {
+ .conduit_state_change = rtl8365mb_conduit_state_change,
.get_tag_protocol = rtl8365mb_get_tag_protocol,
.change_tag_protocol = rtl8365mb_change_tag_protocol,
.setup = rtl8365mb_setup,
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after conduit comes up
2026-11-27 13:15 [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot Juraj Sladek via B4 Relay
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
@ 2026-11-27 13:15 ` Juraj Sladek via B4 Relay
2026-11-28 13:21 ` netdev-bot+sashiko
1 sibling, 1 reply; 10+ messages in thread
From: Juraj Sladek via B4 Relay @ 2026-11-27 13:15 UTC (permalink / raw)
To: Linus Walleij, Luiz Angelo Daros de Luca, Alvin Šipraga,
Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev, Juraj Sladek
From: Juraj Sladek <juraj.sladek@littleit.sk>
With the SerDes data path reset on conduit up in place, about one in
five boots of a TP-Link Archer AX55 v1 (IPQ5018 GMAC connected to port 6
of an RTL8367S over 2500base-x) still ends up with a CPU port that
receives the frames sent by the CPU - port 6 ifInUcastPkts rises, with no
FCS errors and no drops - but never forwards them to any user port.
Traffic from the user ports to the CPU keeps working. In this state
PORT_DEBUG_INFO_CTRL3 (0x091A) reads 0x0000 instead of 0x0035, while all
the configuration registers are identical to a good boot. The state can
also turn by itself, or start out, as one where the frames from the CPU
are forwarded but corrupted (random MAC addresses, malformed payloads),
without any trace in PORT_DEBUG_INFO_CTRL3.
None of these recover the port: another SerDes data path reset, toggling
the forced link or the mode of the external interface, toggling the
HSGMII MAC selection in SDS_MISC, or running the whole PCS configuration
again. A soft reset of the switch core (CHIP_RESET.SW_RST) recovers it
every time, and it keeps the configuration programmed by the driver,
including the VLAN setup; the MIB counters are not cleared either.
Soft reset the switch core 3 seconds after the conduit becomes
operational. That is the delay used in all the testing below; it has
not been tuned. The reset is done unconditionally, since the corrupted
forwarding variant cannot be detected from PORT_DEBUG_INFO_CTRL3.
Tested on the AX55 by rebooting with the switch held in hardware reset
(reset GPIO asserted through the reboot) and checking traffic on a LAN
port after each boot:
without this patch: 14 of 70 boots broken; a SW_RST issued at
runtime recovered all 9 broken boots it was
tried on
with this patch: 0 of 40 boots broken (and 0 of 30 with an
equivalent debug implementation)
power cycle boots: 10 of 10 good with this patch
Fixes: 987137345f33 ("net: dsa: realtek: rtl8365mb: add HSGMII support for RTL8367S")
Signed-off-by: Juraj Sladek <juraj.sladek@littleit.sk>
---
drivers/net/dsa/realtek/rtl8365mb_main.c | 54 ++++++++++++++++++++++++++++++--
1 file changed, 52 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
index 54d90121e..f30758110 100644
--- a/drivers/net/dsa/realtek/rtl8365mb_main.c
+++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
@@ -859,6 +859,7 @@ struct rtl8365mb_port {
* @sds_supported: SerDes tuning parameters match the chip option, so the
* SerDes interface modes can be advertised
* @sds_in_use: the SerDes external interface has been configured
+ * @sds_core_reset_work: switch core soft reset after the conduit comes up
*
* Private data for this driver.
*/
@@ -872,6 +873,7 @@ struct rtl8365mb {
struct phylink_pcs pcs;
bool sds_supported;
bool sds_in_use;
+ struct delayed_work sds_core_reset_work;
};
#define pcs_to_rtl8365mb(_pcs) container_of((_pcs), struct rtl8365mb, pcs)
@@ -3094,11 +3096,48 @@ static int rtl8365mb_reset_chip(struct realtek_priv *priv)
20000, 1e6);
}
+/* On an RTL8367S connected to an IPQ5018 over HSGMII, the port MAC behind the
+ * SerDes occasionally ends up, after the link comes up, in a state where the
+ * frames received from the CPU are counted (ifInUcastPkts rises, no FCS
+ * errors) but never forwarded to any user port, while the switch to CPU
+ * direction keeps working. The port debug information register
+ * (PORT_DEBUG_INFO_CTRL3, 0x091A) then reads 0x0000 instead of 0x0035. This
+ * state can also turn, by itself, into one where those frames are forwarded
+ * but corrupted, or show up like that from the start, without any trace in
+ * the port debug information. Neither a SerDes data path reset nor re-running
+ * the SerDes configuration recovers from any of this, but a switch core soft
+ * reset does, and it keeps the configuration done by this driver, including
+ * the VLAN setup.
+ */
+static void rtl8365mb_sds_core_reset_work(struct work_struct *work)
+{
+ struct rtl8365mb *mb = container_of(to_delayed_work(work),
+ struct rtl8365mb,
+ sds_core_reset_work);
+ struct realtek_priv *priv = mb->priv;
+ u32 val;
+ int ret;
+
+ ret = regmap_update_bits(priv->map, RTL8365MB_CHIP_RESET_REG,
+ RTL8365MB_CHIP_RESET_SW_MASK,
+ RTL8365MB_CHIP_RESET_SW_MASK);
+ if (!ret)
+ ret = regmap_read_poll_timeout(priv->map,
+ RTL8365MB_CHIP_RESET_REG, val,
+ !(val & RTL8365MB_CHIP_RESET_SW_MASK),
+ 1000, 100000);
+ if (ret)
+ dev_err(priv->dev, "failed to soft reset switch core: %pe\n",
+ ERR_PTR(ret));
+}
+
/* The SerDes is configured from phylink long before the conduit Ethernet
* controller starts transmitting on the link, so its receiver initially locks
* on an idle line. On an RTL8367S connected to an IPQ5018 over HSGMII this
* regularly left the switch receiving every frame from the CPU with an FCS
- * error. Reset the SerDes data path again once the conduit is up.
+ * error. Reset the SerDes data path again once the conduit is up, and soft
+ * reset the switch core a few seconds later, see
+ * rtl8365mb_sds_core_reset_work().
*/
static void rtl8365mb_conduit_state_change(struct dsa_switch *ds,
const struct net_device *conduit,
@@ -3108,13 +3147,20 @@ static void rtl8365mb_conduit_state_change(struct dsa_switch *ds,
struct rtl8365mb *mb = priv->chip_data;
int ret;
- if (!operational || !mb->sds_in_use)
+ if (!operational) {
+ cancel_delayed_work(&mb->sds_core_reset_work);
+ return;
+ }
+
+ if (!mb->sds_in_use)
return;
ret = rtl8365mb_sds_reset_datapath(priv);
if (ret)
dev_err(priv->dev, "failed to reset SerDes data path: %pe\n",
ERR_PTR(ret));
+
+ schedule_delayed_work(&mb->sds_core_reset_work, 3 * HZ);
}
static int rtl8365mb_setup(struct dsa_switch *ds)
@@ -3132,6 +3178,8 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
mb->pcs.ops = &rtl8365mb_pcs_ops;
mb->sds_in_use = false;
+ INIT_DELAYED_WORK(&mb->sds_core_reset_work,
+ rtl8365mb_sds_core_reset_work);
/* The SerDes has no link interrupt wired up, so phylink must poll the
* PCS for link changes when it tracks the link through pcs_get_state()
@@ -3323,7 +3371,9 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
static void rtl8365mb_teardown(struct dsa_switch *ds)
{
struct realtek_priv *priv = ds->priv;
+ struct rtl8365mb *mb = priv->chip_data;
+ cancel_delayed_work_sync(&mb->sds_core_reset_work);
rtl8365mb_stats_teardown(priv);
rtl8365mb_irq_teardown(priv);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
@ 2026-11-27 23:09 ` Mieczyslaw Nalewaj
2026-11-28 6:34 ` Juraj Sládek
2026-11-28 8:19 ` Juraj Sládek
2026-11-28 13:21 ` netdev-bot+sashiko
1 sibling, 2 replies; 10+ messages in thread
From: Mieczyslaw Nalewaj @ 2026-11-27 23:09 UTC (permalink / raw)
To: juraj.sladek, Linus Walleij, Luiz Angelo Daros de Luca,
Alvin Šipraga, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev
On 11/27/2026 2:15 PM, Juraj Sladek via B4 Relay wrote:
> From: Juraj Sladek <juraj.sladek@littleit.sk>
>
> The SerDes of the external interface is configured from phylink long
> before the conduit Ethernet controller starts transmitting on the link.
> On a TP-Link Archer AX55 v1, where the IPQ5018 GMAC is connected to port
> 6 of an RTL8367S over a 2500base-x (HSGMII) fixed link, the SerDes
> receiver regularly comes out of this in a state where every frame
> received from the CPU is counted with an FCS error, so the CPU port does
> not work at all until the switch is reset.
>
> rtl8365mb_pcs_config() already resets the SerDes data path right after
> taking the SerDes out of reset. Repeating that reset once the link
> partner actually transmits recovers the receiver, so factor it out and
> call it again from the .conduit_state_change() callback when the conduit
> becomes operational.
>
Hi Juraj,
Thanks for the patch.
Just wanted to give you a heads-up that there is an alternative approach to this exact issue currently being worked on from the SoC/UNIPHY side in OpenWrt (PR #26597: "qualcommax: ipq50xx: program the UNIPHY at gmac probe" by Johan Alvarado, who is already CC'd here): https://github.com/openwrt/openwrt/pull/26597
The root cause identified there is that phylink only programs the qca-uniphy PCS on the first ndo_open of the conduit, leaving it in the bootloader's SGMII (1.25G) mode while the RTL8367S brings up its SerDes at DSA setup and trains against the wrong line rate. Programming the UNIPHY sequence earlier during GMAC probe resolves the FCS errors and dead CPU port on boot (tested on Mercusys MR80X v2, TP-Link Archer AX55 v1, and H3C Magic RC3000 v3) without touching the switch driver.
For context, this follows up on the earlier netdev discussion here:
kernel.org
That said, resetting the SerDes data path on the switch side when the conduit becomes operational might still be a solid defensive measure or useful when the conduit side isn't preconfigured early.
Best regards,
Mieczyslaw Nalewaj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-27 23:09 ` Mieczyslaw Nalewaj
@ 2026-11-28 6:34 ` Juraj Sládek
2026-11-28 8:19 ` Juraj Sládek
1 sibling, 0 replies; 10+ messages in thread
From: Juraj Sládek @ 2026-11-28 6:34 UTC (permalink / raw)
To: Mieczyslaw Nalewaj, Linus Walleij, Luiz Angelo Daros de Luca,
Alvin Šipraga, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev@vger.kernel.org
Hi Mieczyslaw,
Mieczyslaw Nalewaj wrote:
> Just wanted to give you a heads-up that there is an alternative approach to
> this exact issue currently being worked on from the SoC/UNIPHY side in
> OpenWrt (PR #26597: "qualcommax: ipq50xx: program the UNIPHY at gmac probe"
> by Johan Alvarado, who is already CC'd here):
> https://github.com/openwrt/openwrt/pull/26597
Thanks a lot, I had missed both the PR and the earlier netdev thread.
> The root cause identified there is that phylink only programs the
> qca-uniphy PCS on the first ndo_open of the conduit, leaving it in the
> bootloader's SGMII (1.25G) mode while the RTL8367S brings up its SerDes at
> DSA setup and trains against the wrong line rate.
That fits what I measured on the AX55 v1: the switch configures its SerDes
at ~4.6 s, but the IPQ side only starts transmitting at ~7 s, and every
failure I saw was in the CPU -> switch direction (either FCS errors on
port 6, or intact frames on port 6 that were never forwarded). Resetting
the switch side after the conduit is up was a workaround for the same
ordering problem, not a fix for its cause.
I'll test PR #26597 on the AX55 v1 on its own (without my two patches),
using the same reboot loop as for the series (switch held in hardware
reset across reboots; 14 of 70 boots were broken without any fix), and
report the numbers on the PR and here.
If it holds up, I agree the UNIPHY fix is the right one and I'll drop this
series rather than add a workaround to the switch driver. Until then,
please consider the series on hold.
> That said, resetting the SerDes data path on the switch side when the
> conduit becomes operational might still be a solid defensive measure or
> useful when the conduit side isn't preconfigured early.
I don't have a board where the conduit side can't be fixed, so I can't
show a real case for it. I'd rather not push it as a defensive measure
unless the DSA maintainers think it's worth having.
Best regards,
Juraj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-27 23:09 ` Mieczyslaw Nalewaj
2026-11-28 6:34 ` Juraj Sládek
@ 2026-11-28 8:19 ` Juraj Sládek
2026-11-28 9:04 ` Mieczyslaw Nalewaj
1 sibling, 1 reply; 10+ messages in thread
From: Juraj Sládek @ 2026-11-28 8:19 UTC (permalink / raw)
To: Mieczyslaw Nalewaj, Linus Walleij, Luiz Angelo Daros de Luca,
Alvin Šipraga, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev@vger.kernel.org
Hi,
Following up with the test results for OpenWrt PR #26597 on the TP-Link
Archer AX55 v1 (IPQ5018 + RTL8367S, 2500base-x CPU port).
Setup: OpenWrt snapshot r38565 (kernel 6.18.64), kernel rebuilt with the
PR applied and nothing else changed. The rtl8365mb driver is stock, without
my two patches. Each test boot is a reboot with the switch held in hardware
reset (rtl8365mb unbind before reboot), which reproduces the problem without
power cycling. A boot counts as broken if the router doesn't answer ping on
lan1 at ~50 s.
without any fix (earlier series): 14 of 70 boots broken
with PR #26597: 0 of 40 boots broken
Fisher's exact test, one-sided: p = 0.001.
The PR fixes the problem on this board, so please drop this series:
[PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot
I'll add the AX55 results to the OpenWrt PR as well.
Tested-by: Juraj Sladek <juraj.sladek@littleit.sk> (for OpenWrt PR #26597)
Best regards,
Juraj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-28 8:19 ` Juraj Sládek
@ 2026-11-28 9:04 ` Mieczyslaw Nalewaj
0 siblings, 0 replies; 10+ messages in thread
From: Mieczyslaw Nalewaj @ 2026-11-28 9:04 UTC (permalink / raw)
To: Juraj Sládek, Linus Walleij, Luiz Angelo Daros de Luca,
Alvin Šipraga, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King
Cc: Johan Alvarado, netdev@vger.kernel.org
On 11/28/2026 9:19 AM, Juraj Sládek wrote:
> Hi,
>
> Following up with the test results for OpenWrt PR #26597 on the TP-Link
> Archer AX55 v1 (IPQ5018 + RTL8367S, 2500base-x CPU port).
>
> Setup: OpenWrt snapshot r38565 (kernel 6.18.64), kernel rebuilt with the
> PR applied and nothing else changed. The rtl8365mb driver is stock, without
> my two patches. Each test boot is a reboot with the switch held in hardware
> reset (rtl8365mb unbind before reboot), which reproduces the problem without
> power cycling. A boot counts as broken if the router doesn't answer ping on
> lan1 at ~50 s.
>
> without any fix (earlier series): 14 of 70 boots broken
> with PR #26597: 0 of 40 boots broken
>
> Fisher's exact test, one-sided: p = 0.001.
>
> The PR fixes the problem on this board, so please drop this series:
>
> [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot
>
> I'll add the AX55 results to the OpenWrt PR as well.
>
> Tested-by: Juraj Sladek <juraj.sladek@littleit.sk> (for OpenWrt PR #26597)
>
> Best regards,
> Juraj
Hi Juraj,
Thanks for testing this thoroughly and sharing the results.
Now we just need to ask the author of OpenWrt PR #26597 to submit the fix upstream as well.
Best regards,
Mieczyslaw Nalewaj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
2026-11-27 23:09 ` Mieczyslaw Nalewaj
@ 2026-11-28 13:21 ` netdev-bot+sashiko
1 sibling, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 13:21 UTC (permalink / raw)
To: juraj.sladek
Cc: linusw, luizluca, alvin.sipraga, andrew, olteanv, davem, edumazet,
kuba, pabeni, linux, contact, netdev
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] rtl8365mb_conduit_state_change()
(drivers/net/dsa/realtek/rtl8365mb_main.c) resets the port-6 SerDes…
- [Medium] The patch adds a caller of the SerDes indirect-access window
that is not serialised against the existing ones.
- [Low] rtl8365mb_conduit_state_change() reads the plain bool
mb->sds_in_use under rtnl only, with no READ_ONCE and no shared lock,…
--
net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
This patch moves the SerDes data path reset out of rtl8365mb_pcs_config()
into a new helper, rtl8365mb_sds_reset_datapath(). The helper is called
again from a new .conduit_state_change() callback when the conduit becomes
operational. This fixes the FCS errors seen on the CPU port of an RTL8367S
connected to an IPQ5018 over HSGMII.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index da06f952a053d..54d90121ecd26 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -1492,7 +1501,13 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
> val &= ~RTL8365MB_SDS_NWAY_EN_MASK;
> val |= RTL8365MB_SDS_NWAY_RESTART_MASK;
>
> - return rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_NWAY, val);
> + ret = rtl8365mb_sds_write(priv, RTL8365MB_SDS_REG_NWAY, val);
> + if (ret)
> + return ret;
> +
> + mb->sds_in_use = true;
[Severity: Low]
mb->sds_in_use is written here under the phylink state_mutex. The new
rtl8365mb_conduit_state_change() reads it with only rtnl held, with no
READ_ONCE() and no shared lock, and then touches the SerDes:
if (!operational || !mb->sds_in_use)
return;
ret = rtl8365mb_sds_reset_datapath(priv);
Once set, the flag stays true until the next rtl8365mb_setup(). So it does
not exclude a later rtl8365mb_pcs_config() reprogramming the SerDes from
the phylink_resolve() worker.
Isn't this the flag-as-gate pattern, where a flag decides whether to touch
shared hardware state without a lock held?
On its own the effect is small. A stale read only skips one extra reset or
lets one through. A fix for the SDS window race described below would need
to do the sds_in_use check and the data path reset under the same lock that
rtl8365mb_pcs_config() and rtl8365mb_pcs_get_state() hold. Locking each SDS
access separately would not be enough.
The final patch in the series keeps the same lockless check.
> +
> + return 0;
> }
[ ... ]
> @@ -3079,6 +3094,29 @@ static int rtl8365mb_reset_chip(struct realtek_priv *priv)
[ ... ]
> +static void rtl8365mb_conduit_state_change(struct dsa_switch *ds,
> + const struct net_device *conduit,
> + bool operational)
> +{
> + struct realtek_priv *priv = ds->priv;
> + struct rtl8365mb *mb = priv->chip_data;
> + int ret;
> +
> + if (!operational || !mb->sds_in_use)
> + return;
[Severity: Medium]
Should this check which conduit changed state? The conduit argument is
not used. Nothing checks that port 6 is a CPU port, or that it is the CPU
port behind this conduit.
The DSA core does not filter these calls either.
dsa_switch_conduit_state_change() forwards every conduit's change:
net/dsa/switch.c:dsa_switch_conduit_state_change() {
...
ds->ops->conduit_state_change(ds, info->conduit, info->operational);
...
}
The SerDes PCS is not limited to CPU ports. For any SerDes interface,
rtl8365mb_phylink_mac_select_pcs() returns it:
if (rtl8365mb_interface_is_serdes(interface))
return &mb->pcs;
and rtl8365mb_pcs_config() sets sds_in_use whatever role port 6 has.
RTL8367S/RTL8367SB also have a second external interface, RGMII on port 7:
{ 6, 1, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
{ 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) },
This matters in two setups: port 7 is the CPU port and port 6 is an
SGMII/HSGMII user port, or ports 6 and 7 are both CPU ports. In either
case, if the port 7 conduit comes up or its carrier flaps (NETDEV_CHANGE),
won't this write DPRST_PHASE1/PHASE2 to the port 6 SerDes BMCR? That
would flush the FIFOs and resync the PLL on a port 6 link that may be
carrying traffic.
The later patch "net: dsa: realtek: rtl8365mb: soft reset switch core
after conduit comes up" keeps the same unfiltered check
(if (!mb->sds_in_use) return;). It also schedules a soft reset of the
whole switch core 3 seconds after any conduit becomes operational. By the
end of the series this would affect every switch port.
> +
> + ret = rtl8365mb_sds_reset_datapath(priv);
[Severity: Medium]
Can this race with the phylink_resolve() worker on the SerDes indirect
access window?
rtl8365mb_conduit_state_change() runs from the conduit netdev notifier
with only rtnl_lock held. Each rtl8365mb_sds_write() is three separate
regmap transactions: DATA, ADR, then CMD=RUN|WR. rtl8365mb_sds_read() is
ADR, CMD=RUN, a busy poll, then DATA. priv->map_lock only covers one
transaction at a time.
Before this patch, every SDS access came from the port 6 PCS ops, and
phylink serialises those with pl->state_mutex. phylink_resolve() takes
state_mutex but not rtnl. It can reach the SDS window two ways:
phylink_resolve()
rtl8365mb_pcs_get_state()
rtl8365mb_sds_read(priv, RTL8365MB_SDS_REG_LINK_STATUS, &status)
This path is polled, because rtl8365mb_setup() sets mb->pcs.poll = true
for in-band mode.
phylink_resolve()
phylink_major_config()
rtl8365mb_pcs_config()
This path runs when a PHY switches between SGMII and 2500BASE-X.
One possible interleaving:
conduit path resolve worker
DATA = DPRST_PHASE1
ADR = BMCR
ADR = LINK_STATUS
CMD = RUN | WR
Here PHASE1 would land in the link status register instead of BMCR.
Other interleavings are possible too. If a read is in flight, a concurrent
CMD=RUN|WR could write the read result into BMCR. The jam table writes and
the NWAY read-modify-write in rtl8365mb_pcs_config() could also be
corrupted.
The OCP PHY window in rtl8365mb_phy_ocp_read() and
rtl8365mb_phy_ocp_write() uses rtl83xx_lock() and priv->map_nolock for
this reason. Does the SDS window need a similar lock? As far as I can
tell, the final patch in the series does not add one.
> + if (ret)
> + dev_err(priv->dev, "failed to reset SerDes data path: %pe\n",
> + ERR_PTR(ret));
> +}
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127-rtl8365mb-hsgmii-fix-v1-0-f2827126aa6a%40littleit.sk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after conduit comes up
2026-11-27 13:15 ` [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after " Juraj Sladek via B4 Relay
@ 2026-11-28 13:21 ` netdev-bot+sashiko
2026-11-28 17:55 ` Juraj Sládek
0 siblings, 1 reply; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 13:21 UTC (permalink / raw)
To: juraj.sladek
Cc: linusw, luizluca, alvin.sipraga, andrew, olteanv, davem, edumazet,
kuba, pabeni, linux, contact, netdev
Thank you for your contribution! Sashiko AI review found 6 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 5 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The whole switch core is soft-reset (CHIP_RESET.SW_RST) 3
seconds after every time the conduit becomes operational, for as long…
- [Medium] The reset is gated only on mb->sds_in_use, but
rtl8365mb_pcs_config() sets mb->sds_in_use = true for SGMII as well as…
- [Medium] rtl8365mb_conduit_state_change() ignores its `conduit`
argument, so the new cancel/schedule logic reacts to every conduit of…
- [Medium] On conduit down, rtl8365mb_conduit_state_change() cancels
sds_core_reset_work with the non-sync cancel_delayed_work(), which…
- [Medium] rtl8365mb_sds_core_reset_work() asserts SW_RST without any
lock that serializes it against the driver's other multi-register…
- [Low] The new rtl8365mb_sds_core_reset_work() writes CHIP_RESET
(0x1322) under different assumptions than the existing code that…
--
net: dsa: realtek: rtl8365mb: soft reset switch core after conduit comes up
This adds a delayed work that soft resets the switch core
(CHIP_RESET.SW_RST) 3 seconds after the conduit becomes operational while
the SerDes is in use. The goal is to recover the CPU port on an RTL8367S
connected to an IPQ5018 over HSGMII, which sometimes stops forwarding
frames from the CPU or forwards them corrupted. The work is cancelled on
conduit down, and synchronously in rtl8365mb_teardown().
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 54d90121ecd26..f307581107f2e 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -3094,11 +3096,48 @@ static int rtl8365mb_reset_chip(struct realtek_priv *priv)
> 20000, 1e6);
> }
>
> +/* On an RTL8367S connected to an IPQ5018 over HSGMII, the port MAC behind the
> + * SerDes occasionally ends up, after the link comes up, in a state where the
[ ... ]
> +static void rtl8365mb_sds_core_reset_work(struct work_struct *work)
> +{
> + struct rtl8365mb *mb = container_of(to_delayed_work(work),
> + struct rtl8365mb,
> + sds_core_reset_work);
> + struct realtek_priv *priv = mb->priv;
> + u32 val;
> + int ret;
> +
> + ret = regmap_update_bits(priv->map, RTL8365MB_CHIP_RESET_REG,
> + RTL8365MB_CHIP_RESET_SW_MASK,
> + RTL8365MB_CHIP_RESET_SW_MASK);
[Severity: Low]
rtl8365mb_reset_chip() writes the same CHIP_RESET register with
priv->write_reg_noack(). It then sleeps 100 ms before polling, with a
1 second timeout:
priv->write_reg_noack(priv, RTL8365MB_CHIP_RESET_REG,
FIELD_PREP(RTL8365MB_CHIP_RESET_HW_MASK, 1));
...
msleep(100);
realtek_smi_write_reg_noack() also carries this comment:
/* There is one single case when we need to use this accessor and that
* is when issueing soft reset. Since the device reset as soon as we write
* that bit, no ACK will come back for natural reasons.
*/
Does SW_RST behave differently on the bus? If it also suppresses the ACK,
regmap_update_bits() would fail on SMI-attached switches. The worker would
then print "failed to soft reset switch core" even though the reset went
out, and it would skip the completion poll.
The tested board is MDIO-attached. There, write_reg_noack is
realtek_mdio_write(), so the testing would not show this difference.
Is a 100 ms poll timeout enough, given the 1 second reset time documented
in rtl8365mb_reset_chip()?
> + if (!ret)
> + ret = regmap_read_poll_timeout(priv->map,
> + RTL8365MB_CHIP_RESET_REG, val,
> + !(val & RTL8365MB_CHIP_RESET_SW_MASK),
> + 1000, 100000);
[Severity: Medium]
What keeps this reset from overlapping the driver's other multi-register
sequences?
regmap_update_bits() holds priv->map_lock only for the read-modify-write.
regmap_read_poll_timeout() sleeps between reads with map_lock released.
So while SW_RST is still asserted, other contexts can start register
sequences, for example:
phylink poll (mb->pcs.poll = true) -> pcs_get_state -> rtl8365mb_sds_read()
(separate ADR write, CMD write, BUSY poll and DATA read)
mib_work or ethtool -> rtl8365mb_mib_counter_read() under mib_lock
VLAN/L2 table ops -> rtl8365mb_table_access() under map_lock
indirect PHY OCP accesses
A table operation already in progress holds map_lock throughout, so the
reset can't interrupt it. A new one can still start during the reset
window, though, and a SerDes or MIB sequence can be split across the
reset.
The 3 second timer starts at conduit up. That is also when userspace
typically creates bridges and adds VLANs and FDB entries.
Could writes issued during the reset be lost? Could a PCS poll read a
bogus link status and make phylink bounce the CPU link? The commit message
says the reset keeps the driver's configuration. Does that only hold for
writes that completed before the reset?
> + if (ret)
> + dev_err(priv->dev, "failed to soft reset switch core: %pe\n",
> + ERR_PTR(ret));
> +}
[ ... ]
> @@ -3108,13 +3147,20 @@ static void rtl8365mb_conduit_state_change(struct dsa_switch *ds,
> struct rtl8365mb *mb = priv->chip_data;
> int ret;
>
> - if (!operational || !mb->sds_in_use)
> + if (!operational) {
> + cancel_delayed_work(&mb->sds_core_reset_work);
> + return;
> + }
[Severity: Medium]
rtl8365mb_conduit_state_change() never looks at its conduit argument.
rtl8365mb_setup() accepts several CPU ports, and the RTL8367S chip info
lists both a SerDes and an RGMII external interface:
{ 6, 1, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
{ 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) |
PHY_INTF(RMII) | PHY_INTF(RGMII) },
Say ports 6 and 7 are both CPU ports, and the RGMII conduit goes down
within 3 seconds of the SerDes conduit coming up. Would that cancel the
reset meant for the SerDes CPU port?
The SerDes conduit stays operational and gets no further up event, so the
port could stay in the broken state this patch is meant to recover from.
The reverse case: when the RGMII conduit comes up, it passes the global
mb->sds_in_use check. That triggers a SerDes datapath reset and a
switch-wide SW_RST even though the SerDes link did not change.
The same happens when the SerDes is used for a user port and the CPU port
is RGMII, since rtl8365mb_phylink_get_caps() advertises SGMII/2500BASEX
for any port whose extint supports it. Every conduit up would then reset
the whole switch core.
Should this check that the conduit is the one behind the SerDes CPU port?
> +
> + if (!mb->sds_in_use)
> return;
[Severity: Medium]
rtl8365mb_pcs_config() sets mb->sds_in_use for SGMII as well as
2500base-x:
if (interface == PHY_INTERFACE_MODE_2500BASEX) {
sds_jam = rtl8365mb_sds_jam_hsgmii;
...
mb->sds_in_use = true;
The commit message and the new comment above
rtl8365mb_sds_core_reset_work() describe the problem only for an RTL8367S
connected to an IPQ5018 over HSGMII, and only the Archer AX55 was tested.
Is it intended that every SerDes user now gets an unconditional
switch-core soft reset after conduit up? That includes SGMII setups and
the Mercusys MR80X HSGMII board the Fixes: commit was tested on.
SGMII support predates commit 987137345f33. Because of the Fixes: tag,
stable backports would also change behaviour for SGMII configurations
that existed before that commit.
Could the commit message cover the wider scope, or could the reset be
limited to the affected mode?
>
> ret = rtl8365mb_sds_reset_datapath(priv);
> if (ret)
> dev_err(priv->dev, "failed to reset SerDes data path: %pe\n",
> ERR_PTR(ret));
> +
> + schedule_delayed_work(&mb->sds_core_reset_work, 3 * HZ);
[Severity: Medium]
This schedules a SW_RST every time the conduit becomes operational, not
only on the first bring-up after rtl8365mb_setup(). In net/dsa/user.c, a
NETDEV_CHANGE on the conduit calls:
dsa_tree_conduit_oper_state_change(dst, dev,
netif_oper_up(dev));
It also calls dsa_tree_conduit_admin_state_change() based on
qdisc_tx_is_noop(). Both reach
dsa_tree_conduit_state_change() -> rtl8365mb_conduit_state_change().
So each of the following resets the switch core 3 seconds later:
ip link set down/up on the conduit
a conduit carrier flap
a conduit driver reset
a qdisc change
Does that interrupt forwarding on every user port, including bridged
user-to-user traffic that never touches the CPU?
All of the testing in the commit message is on boots. After a runtime
SW_RST, does the L2 LUT keep its contents? That includes the host FDB/MDB
entries DSA installs (assisted_learning_on_cpu_port and fdb_isolation are
set) as well as learned entries.
What about STP state and isolation masks programmed at runtime? Nothing
re-applies or checks that state after the reset.
Should the reset be limited to the first conduit up after setup?
> }
[ ... ]
> @@ -3323,7 +3371,9 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
> static void rtl8365mb_teardown(struct dsa_switch *ds)
> {
> struct realtek_priv *priv = ds->priv;
> + struct rtl8365mb *mb = priv->chip_data;
>
> + cancel_delayed_work_sync(&mb->sds_core_reset_work);
[Severity: Medium]
cancel_delayed_work_sync() is only reached through .teardown. On the
shutdown path, dsa_switch_shutdown() closes the conduits and unlinks the
user ports but never calls ds->ops->teardown:
rtl83xx_shutdown()
dsa_switch_shutdown()
netif_close_many()
... rtl8365mb_conduit_state_change(operational=false)
cancel_delayed_work()
dev_set_drvdata(priv->dev, NULL);
cancel_delayed_work() does not wait for an instance that is already
running. The worker can be running for up to about 100 ms (the SW_RST
write plus the poll). Can it keep using priv->map after shutdown has
returned?
The comment on rtl83xx_shutdown() notes that the parent bus may implement
.shutdown() as .remove(). In that case devres frees the devm_kzalloc()'d
realtek_priv, which also holds struct rtl8365mb and this delayed_work.
Would a worker still running then use freed memory?
The same non-sync cancel matters at runtime. If the conduit goes down and
up while the worker runs, rtl8365mb_sds_reset_datapath() can issue its
rtl8365mb_sds_write() sequences while SW_RST may still be asserted. A
reset can also complete after the conduit was reported non-operational.
The existing per-port mib_work has a similar gap on shutdown.
> rtl8365mb_stats_teardown(priv);
> rtl8365mb_irq_teardown(priv);
> }
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127-rtl8365mb-hsgmii-fix-v1-0-f2827126aa6a%40littleit.sk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after conduit comes up
2026-11-28 13:21 ` netdev-bot+sashiko
@ 2026-11-28 17:55 ` Juraj Sládek
0 siblings, 0 replies; 10+ messages in thread
From: Juraj Sládek @ 2026-11-28 17:55 UTC (permalink / raw)
To: netdev-bot+sashiko@kernel.org
Cc: linusw@kernel.org, luizluca@gmail.com, alvin.sipraga@analog.com,
andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
linux@armlinux.org.uk, contact@c127.dev, netdev@vger.kernel.org
Hi,
Thanks for the review. The points raised on both patches are valid,
in particular:
- the callback ignores the conduit argument, so it reacts to any conduit
(e.g. an RGMII CPU port on port 7) and not only to the one behind the
SerDes CPU port;
- the conduit notifier path is not serialised against the phylink resolve
worker on the SerDes indirect access window;
- in patch 2, the switch core soft reset runs on every conduit up, not
only the first one after setup, it isn't limited to HSGMII, and it isn't
serialised against other register sequences. cancel_delayed_work() on
the shutdown path also doesn't wait for a running worker.
I'm not respinning this series. The root cause is on the SoC side: the
IPQ5018 UNIPHY stays in the bootloader's SGMII mode until the conduit's
first ndo_open. OpenWrt PR #26597 fixes it there, and with it I had 0 of
40 boots broken on the same board. The series is withdrawn, see my earlier
reply in this thread.
pw-bot: cr
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-11-28 17:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 13:15 [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot Juraj Sladek via B4 Relay
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
2026-11-27 23:09 ` Mieczyslaw Nalewaj
2026-11-28 6:34 ` Juraj Sládek
2026-11-28 8:19 ` Juraj Sládek
2026-11-28 9:04 ` Mieczyslaw Nalewaj
2026-11-28 13:21 ` netdev-bot+sashiko
2026-11-27 13:15 ` [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after " Juraj Sladek via B4 Relay
2026-11-28 13:21 ` netdev-bot+sashiko
2026-11-28 17:55 ` Juraj Sládek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox