Re: [PATCH 4/4] net: dsa: soce: Add initial driver support for MRS switches
From: Vasilij Strassheim
Date: Wed Aug 05 2026 - 09:34:49 EST
On Mon, 2026-08-03 at 18:49 +0200, Andrew Lunn wrote:
> On Mon, Aug 03, 2026 at 06:01:23PM +0200, Vasilij Strassheim wrote:
> > On Wed, 2026-07-29 at 22:05 +0200, Andrew Lunn wrote:
> > > > +static u8 soce_map_stp_state(u8 state)
> > > > +{
> > > > + switch (state) {
> > > > + case BR_STATE_DISABLED:
> > > > + case BR_STATE_BLOCKING:
> > > > + case BR_STATE_LISTENING:
> > > > + return 0;
> > > > + case BR_STATE_LEARNING:
> > > > + return 1;
> > > > + case BR_STATE_FORWARDING:
> > > > + default:
> > > > + return 3;
> > >
> > > #defines for 0, 1 and 3.
> > >
> > > What does 2 mean?
> > >
> > > Since you don't implement bridge offload, i'm not sure having STP
> > > states makes any sense.
> >
> > I tested bridge and STP and observed the callback calls with something like
> > this (reduced setup):
> > # ip link add name br0 type bridge
> > # ip link set dev port0 master br0
> > # ip link set dev port1 master br0
> > # brctl stp br0 on
> >
> > That probably wasn't enough. I'll take a closer look at it and either fix it
> > or remove it for the next version.
>
> For a really minimal DSA driver, look at mv88e6060. But it is also
> really old, and does not always follow best practices, e.g. .phy_read
> and .phy_write which should be replaced by a Linux MDIO driver.
Will do that and compare it with newer drivers as well.
> Andrew
Thanks,
Vasilij