mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
To: "Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	"Yury Norov" <yury.norov@gmail.com>,
	"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
	"Russell King" <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Abdulkader Alrezej <abdulkader.alrezej@gmail.com>
Subject: Re: [net-next PATCH v4 2/8] net: dsa: realtek: rtl8365mb: use dsa helpers for port iteration
Date: Sun, 17 May 2026 08:53:27 +0200	[thread overview]
Message-ID: <7d2dbd71-b82c-4ff0-97ed-3af39143289f@yahoo.com> (raw)
In-Reply-To: <20260516-realtek_forward-v4-2-8b6d6a1eefdc@gmail.com>

On 5/16/2026 5:46 AM, Luiz Angelo Daros de Luca wrote:
> Use dsa_switch_for_each_*() whenever possible.
> 
> For port setup(), a new blocking setup phase was added for all ports,
> including unused ones, before the user and CPU port setup.
> 
> CPU isolation includes all user ports as traffic was being blocked in
> some scenarios (suggested by Abdulkader Alrezej).
> 
> The driver bails out if a DSA port is detected as the driver was not
> tested in a cascading setup.
> 
> Suggested-by: Abdulkader Alrezej <abdulkader.alrezej@gmail.com>
> Reviewed-by: Linus Walleij <linusw@kernel.org>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> ---> [...]> @@ -1974,46 +1978,83 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
>  	else if (ret)
>  		dev_info(priv->dev, "no interrupt support\n");
>  
> -	/* Configure CPU tagging */
> -	dsa_switch_for_each_cpu_port(cpu_dp, ds) {
> -		cpu->mask |= BIT(cpu_dp->index);
> +	/* Start with all ports blocked, including unused ports */
> +	dsa_switch_for_each_port(dp, ds) {
> +		struct rtl8365mb_port *p = &mb->ports[dp->index];
>  
> -		if (cpu->trap_port == RTL8365MB_MAX_NUM_PORTS)
> -			cpu->trap_port = cpu_dp->index;
> -	}
> -	cpu->enable = cpu->mask > 0;
> -	ret = rtl8365mb_cpu_config(priv);
> -	if (ret)
> -		goto out_teardown_irq;
> -
> -	/* Configure ports */
> -	for (i = 0; i < priv->num_ports; i++) {
> -		struct rtl8365mb_port *p = &mb->ports[i];
> +		if (dsa_port_is_dsa(dp)) {
> +			dev_err(ds->dev, "Cascading (DSA links) not supported");
> +			return -EOPNOTSUPP;
> +		}
>  
Missing trailing \n in the format string. Kernel dev_err() messages aren't auto-newlined by the logging machinery — without one, this line will be glued to whatever subsequent printk follows. Every other dev_err/dev_info in this driver (e.g. the dev_info(priv->dev, "no interrupt support\n"); a few lines above) terminates with \n


  parent reply	other threads:[~2026-05-17  7:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16  3:46 [net-next PATCH v4 0/8] net: dsa: realtek: rtl8365mb: bridge offloading and VLAN support Luiz Angelo Daros de Luca
2026-05-16  3:46 ` [net-next PATCH v4 1/8] net: dsa: realtek: rtl8365mb: use ERR_PTR Luiz Angelo Daros de Luca
2026-05-16 15:33   ` Mieczyslaw Nalewaj
2026-05-16  3:46 ` [net-next PATCH v4 2/8] net: dsa: realtek: rtl8365mb: use dsa helpers for port iteration Luiz Angelo Daros de Luca
2026-05-16 15:32   ` Mieczyslaw Nalewaj
2026-05-17  6:53   ` Mieczyslaw Nalewaj [this message]
2026-05-16  3:46 ` [net-next PATCH v4 3/8] net: dsa: realtek: rtl8365mb: prepare for multiple source files Luiz Angelo Daros de Luca
2026-05-16  3:46 ` [net-next PATCH v4 4/8] net: dsa: realtek: rtl8365mb: add table lookup interface Luiz Angelo Daros de Luca
2026-05-16 15:31   ` Mieczyslaw Nalewaj
2026-05-16  3:46 ` [net-next PATCH v4 5/8] net: dsa: realtek: rtl8365mb: add VLAN support Luiz Angelo Daros de Luca
2026-05-16 15:31   ` Mieczyslaw Nalewaj
2026-05-17  7:01   ` Mieczyslaw Nalewaj
2026-05-16  3:46 ` [net-next PATCH v4 6/8] net: dsa: realtek: rtl8365mb: add port_bridge_{join,leave} Luiz Angelo Daros de Luca
2026-05-16 15:30   ` Mieczyslaw Nalewaj
2026-05-16  3:46 ` [net-next PATCH v4 7/8] net: dsa: realtek: rtl8365mb: add FDB support Luiz Angelo Daros de Luca
2026-05-16  5:48   ` Mieczyslaw Nalewaj
2026-05-16 12:47     ` Luiz Angelo Daros de Luca
2026-05-16 15:29       ` Mieczyslaw Nalewaj
2026-05-18  4:38   ` Luiz Angelo Daros de Luca
2026-05-16  3:46 ` [net-next PATCH v4 8/8] net: dsa: realtek: rtl8365mb: add bridge port flags Luiz Angelo Daros de Luca

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=7d2dbd71-b82c-4ff0-97ed-3af39143289f@yahoo.com \
    --to=namiltd@yahoo.com \
    --cc=abdulkader.alrezej@gmail.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=luizluca@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=yury.norov@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

all inboxes | Powered by JetHome®