[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230519235405.la4inpjqwk5wq7wx@skbuf>
Date: Sat, 20 May 2023 02:54:05 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Arınç ÜNAL <arinc.unal@...nc9.com>
Cc: Frank Wunderlich <frank-w@...lic-files.de>,
Felix Fietkau <nbd@....name>, netdev <netdev@...r.kernel.org>,
erkin.bozoglu@...ont.com, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
John Crispin <john@...ozen.org>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Landen Chao <Landen.Chao@...iatek.com>,
Sean Wang <sean.wang@...iatek.com>,
DENG Qingfang <dqfext@...il.com>, mithat.guner@...ont.com
Subject: Re: Choose a default DSA CPU port
On Fri, May 19, 2023 at 12:00:17PM +0300, Arınç ÜNAL wrote:
> > mt7530_rmw(priv, MT753X_MFC, MT7530_CPU_EN | MT7530_CPU_PORT_MASK,
> > MT7530_CPU_PORT(0));
>
> If I understand correctly, the MT7530_CPU_EN bit here wouldn't be modified
> since it's not on the set parameter.
"mask": which bits are affected by the read-modify-write (rmw)
"set": which subset of "mask" remains set (the other subset, mask & ~set,
remains unset)
So no, MT7530_CPU_EN is not unmodified; it is quite cleared.
> On top of this, I believe we can completely get rid of the else case.
> The MT7530_CPU_PORT bits will be overwritten when there's an active
> CPU port so there's no need to clear them when there's no active CPU
> ports. MT7530_CPU_EN might as well stay set.
Sounds plausible.
Powered by blists - more mailing lists