From: DENG Qingfang <dqfext@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org
Subject: Re: [PATCH net 1/1] net: dsa: qca: ar9331: make proper initial port defaults
Date: Tue, 3 Aug 2021 16:14:35 +0800 [thread overview]
Message-ID: <20210803081435.2910620-1-dqfext@gmail.com> (raw)
In-Reply-To: <20210803065424.9692-1-o.rempel@pengutronix.de>
On Tue, Aug 03, 2021 at 08:54:24AM +0200, Oleksij Rempel wrote:
> + if (dsa_is_cpu_port(ds, port)) {
> + /* CPU port should be allowed to communicate with all user
> + * ports.
> + */
> + port_mask = dsa_user_ports(ds);
> + /* Enable Atheros header on CPU port. This will allow us
> + * communicate with each port separately
> + */
> + port_ctrl |= AR9331_SW_PORT_CTRL_HEAD_EN;
> + } else if (dsa_is_user_port(ds, port)) {
> + /* User ports should communicate only with the CPU port.
> + */
> + port_mask = BIT(dsa_to_port(ds, port)->cpu_dp->index);
> + port_ctrl |= AR9331_SW_PORT_CTRL_LEARN_EN;
All user ports should start with address learning disabled.
To toggle it, implement .port_pre_bridge_flags and .port_bridge_flags.
> + } else {
> + /* Other ports do not need to communicate at all */
> + port_mask = 0;
> + }
> +
next prev parent reply other threads:[~2021-08-03 8:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 6:54 [PATCH net 1/1] net: dsa: qca: ar9331: make proper initial port defaults Oleksij Rempel
2021-08-03 8:14 ` DENG Qingfang [this message]
2021-08-03 8:44 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210803081435.2910620-1-dqfext@gmail.com \
--to=dqfext@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).