lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCSL4l/Fd37CgGBa@makrotopia.org>
Date:   Wed, 29 Mar 2023 20:05:06 +0100
From:   Daniel Golle <daniel@...rotopia.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        DENG Qingfang <dqfext@...il.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Sam Shih <Sam.Shih@...iatek.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        John Crispin <john@...ozen.org>, Felix Fietkau <nbd@....name>
Subject: Re: [RFC PATCH net-next v3 14/15] net: dsa: mt7530: introduce driver
 for MT7988 built-in switch

On Wed, Mar 29, 2023 at 06:57:54PM +0200, Andrew Lunn wrote:
> > @@ -18,6 +18,7 @@ enum mt753x_id {
> >  	ID_MT7530 = 0,
> >  	ID_MT7621 = 1,
> >  	ID_MT7531 = 2,
> > +	ID_MT7988 = 3,
> >  };
> >  
> >  #define	NUM_TRGMII_CTRL			5
> > @@ -54,11 +55,11 @@ enum mt753x_id {
> >  #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
> >  #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
> >  
> > -#define MT753X_MIRROR_REG(id)		(((id) == ID_MT7531) ? \
> > +#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
> >  					 MT7531_CFC : MT7530_MFC)
> > -#define MT753X_MIRROR_EN(id)		(((id) == ID_MT7531) ? \
> > +#define MT753X_MIRROR_EN(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
> >  					 MT7531_MIRROR_EN : MIRROR_EN)
> > -#define MT753X_MIRROR_MASK(id)		(((id) == ID_MT7531) ? \
> > +#define MT753X_MIRROR_MASK(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
> >  					 MT7531_MIRROR_MASK : MIRROR_MASK)
> 
> Are there more devices coming soon? I'm just wondering if these should
> change into static inline functions with a switch statement? The
> current code is not going to scale too much more.

Afaik no devices with different built-in switches are in the pipe at
this time, so this should be fine for a while.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ