Re: [PATCH net-next v3 8/8] net: dsa: soce: Disable unsupported hardware STP
From: netdev-bot+sashiko
Date: Sun Sep 27 2026 - 08:32:53 EST
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Series-structure concern.
--
net: dsa: soce: Disable unsupported hardware STP
This commit checks the STP synthesis bit in the implemented features
register. When the bit is set, soce_setup() clears the STP control
enable bit, so STP state handling is left to the Linux bridge.
> diff --git a/drivers/net/dsa/soce/soce_dsa_core.c b/drivers/net/dsa/soce/soce_dsa_core.c
> index f93ce9da8400c..3b9fde7a547e7 100644
> --- a/drivers/net/dsa/soce/soce_dsa_core.c
> +++ b/drivers/net/dsa/soce/soce_dsa_core.c
[ ... ]
> @@ -160,6 +165,7 @@ static int soce_sw_detect_features(struct soce_dsa_local *local,
> return -ENODEV;
>
> features->port_vlan = regval & SOCE_IMPL_FEATURES0_PORT_VLAN;
> + features->stp = regval & SOCE_IMPL_FEATURES0_STP;
>
> implemented_numports =
> FIELD_GET(SOCE_IMPL_FEATURES0_NUM_PORTS_MASK, regval);
[ ... ]
> @@ -420,6 +436,10 @@ static int soce_setup(struct dsa_switch *ds)
> if (ret)
> return ret;
>
> + /* Unconfigured hardware STP blocks frame forwarding. */
> + if (priv->features.stp)
> + soce_stp_disable(&priv->local);
> +
> soce_sw_enable_tagging(&priv->local);
>
> return 0;
[Severity: Low]
This isn't a bug, but could this be folded into the base driver patch?
Two earlier patches in the series already accept cores synthesized with
SOCE_IMPL_FEATURES0_STP set, but neither touches SOCE_STP_CTRL_OFFSET:
net: dsa: soce: Add basic support for SoC-e switch IP cores
net: dsa: soce: Add VLAN offload support
This commit's message says such cores block frame forwarding. So if you
bisect to either of those commits on an STP-synthesized core, the driver
would probe and then forward nothing.
The whole driver is new in this series, so nothing that worked before
regresses. A Fixes: tag pointing at an unmerged commit in the same series
wouldn't be wanted either. Squashing this change into the base driver
patch would avoid that intermediate state.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260923-devel-vstrassheim-soce-dsa-ml-v3-0-ddebafcb9ba7%40linutronix.de