Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: jonas.gorski@gmail.com, florian.fainelli@broadcom.com,
	andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, vivien.didelot@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dgcbueu@gmail.com
Subject: Re: [RFC PATCH 08/10] net: dsa: b53: fix unicast/multicast flooding on BCM5325
Date: Mon, 2 Jun 2025 12:44:23 +0300	[thread overview]
Message-ID: <20250602094423.z56vjqlyxp7sbdhw@skbuf> (raw)
In-Reply-To: <20250531101308.155757-9-noltari@gmail.com>

On Sat, May 31, 2025 at 12:13:06PM +0200, Álvaro Fernández Rojas wrote:
> BCM5325 doesn't implement UC_FLOOD_MASK, MC_FLOOD_MASK and IPMC_FLOOD_MASK
> registers.
> This has to be handled differently with other pages and registers.
> 
> Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  drivers/net/dsa/b53/b53_common.c | 85 +++++++++++++++++++++++++-------
>  drivers/net/dsa/b53/b53_regs.h   | 38 ++++++++++++++
>  2 files changed, 105 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 387e1e7ec749..d5216ea2c984 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -560,12 +560,36 @@ static void b53_port_set_ucast_flood(struct b53_device *dev, int port,
>  {
>  	u16 uc;
>  
> -	b53_read16(dev, B53_CTRL_PAGE, B53_UC_FLOOD_MASK, &uc);
> -	if (unicast)
> -		uc |= BIT(port);
> -	else
> -		uc &= ~BIT(port);
> -	b53_write16(dev, B53_CTRL_PAGE, B53_UC_FLOOD_MASK, uc);
> +	if (is5325(dev)) {

Maybe instead of a big "if (is5325(dev)) else", you could have this instead?

	if (is5325(dev))
		return b5325_port_set_ucast_flood();

	... // go on with regular procedure

Here and in other places.

  reply	other threads:[~2025-06-02  9:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-31 10:12 [RFC PATCH 00/10] net: dsa: b53: fix BCM5325 support Álvaro Fernández Rojas
2025-05-31 10:12 ` [RFC PATCH 01/10] net: dsa: b53: add support for FDB operations on 5325/5365 Álvaro Fernández Rojas
2025-06-02 18:22   ` Florian Fainelli
2025-06-02 20:09   ` Jonas Gorski
2025-05-31 10:13 ` [RFC PATCH 02/10] net: dsa: b53: prevent FAST_AGE access on BCM5325 Álvaro Fernández Rojas
2025-06-02  9:37   ` Vladimir Oltean
2025-06-02 18:01     ` Florian Fainelli
2025-06-03 10:19       ` Vladimir Oltean
2025-05-31 10:13 ` [RFC PATCH 03/10] net: dsa: b53: prevent SWITCH_CTRL " Álvaro Fernández Rojas
2025-06-02 18:03   ` Florian Fainelli
2025-05-31 10:13 ` [RFC PATCH 04/10] net: dsa: b53: fix IP_MULTICAST_CTRL " Álvaro Fernández Rojas
2025-06-02 18:06   ` Florian Fainelli
2025-06-02 19:59     ` Jonas Gorski
2025-06-03 10:50       ` Álvaro Fernández Rojas
2025-05-31 10:13 ` [RFC PATCH 05/10] net: dsa: b53: prevent DIS_LEARNING access " Álvaro Fernández Rojas
2025-06-02  9:40   ` Vladimir Oltean
2025-05-31 10:13 ` [RFC PATCH 06/10] net: dsa: b53: prevent BRCM_HDR " Álvaro Fernández Rojas
2025-06-02 18:07   ` Florian Fainelli
2025-05-31 10:13 ` [RFC PATCH 07/10] net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL " Álvaro Fernández Rojas
2025-06-02 18:08   ` Florian Fainelli
2025-05-31 10:13 ` [RFC PATCH 08/10] net: dsa: b53: fix unicast/multicast flooding " Álvaro Fernández Rojas
2025-06-02  9:44   ` Vladimir Oltean [this message]
2025-06-02 18:09   ` Florian Fainelli
2025-06-02 20:08     ` Jonas Gorski
2025-06-03 10:18       ` Álvaro Fernández Rojas
2025-06-03 10:31         ` Jonas Gorski
2025-05-31 10:13 ` [RFC PATCH 09/10] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325 Álvaro Fernández Rojas
2025-06-02 18:11   ` Florian Fainelli
2025-06-03 10:12     ` Álvaro Fernández Rojas
2025-05-31 10:13 ` [RFC PATCH 10/10] net: dsa: b53: ensure BCM5325 PHYs are enabled Álvaro Fernández Rojas
2025-06-02 16:00   ` Florian Fainelli
2025-06-03 10:13     ` Álvaro Fernández Rojas
2025-06-02 20:14 ` [RFC PATCH 00/10] net: dsa: b53: fix BCM5325 support Jonas Gorski

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=20250602094423.z56vjqlyxp7sbdhw@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dgcbueu@gmail.com \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noltari@gmail.com \
    --cc=pabeni@redhat.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