[PATCH net v5 2/6] net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch

Vladimir Oltean olteanv at gmail.com
Fri Jun 16 03:25:20 PDT 2023


On Fri, Jun 16, 2023 at 11:17:54AM +0100, Russell King (Oracle) wrote:
> On Fri, Jun 16, 2023 at 01:03:14PM +0300, Vladimir Oltean wrote:
> > On Fri, Jun 16, 2023 at 05:53:23AM +0300, arinc9.unal at gmail.com wrote:
> > > From: Arınç ÜNAL <arinc.unal at arinc9.com>
> > > 
> > > The check for setting the CPU_PORT bits must include the non-MT7621 SoC
> > > MT7530 switch variants to trap frames. Expand the check to include them.
> > > 
> > > Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> > > Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> > > ---
> > 
> > why do you say non-MT7621 when the change specifically includes MT7621?
> > What is the affected SoC then?
> 
> Thanks for falling into one of the issues that makes reviewing these
> patches difficult. :/
> 
> > > -	if (priv->id == ID_MT7621)
> > > +	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
> > >  		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
> 
> I *think* what the commit message should be saying is that the setup
> for the CPU port(*) is necessary not only for MT7621, but also for
> MT7530 variants as well.
> 
> That can be construed from the commit message, but it doesn't easily
> read that way.
> 
> * - in this case, it's the CPU port field and the CPU enable bit.
> Note that CPU_MASK only covers CPU_PORT() and not CPU_EN, but this
> doesn't matter for mt7530_rmw().
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Ah, no, I just misread the patch, because the new term was added to the
left of the existing one, and not to the right as I would have expected.
I though it was this:

> > > -	if (priv->id == ID_MT7530)
> > > +	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)

thus my confusion and my question.

I'm okay with the change now.



More information about the linux-arm-kernel mailing list