Netdev List
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: "Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	netdev@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>,
	"Semih Baskan" <strst.gs@gmail.com>
Subject: [PATCH net] net: dsa: b53: skip EAP mode setup on Northstar SoCs when using port 5 or 7
Date: Sun,  9 Aug 2026 11:39:34 +0200	[thread overview]
Message-ID: <20260809093934.28098-1-zajec5@gmail.com> (raw)

From: Rafał Miłecki <rafal@milecki.pl>

Northstar devices have 3 CPU ports. This design was meant for dual IMP
setups when WAN traffic goes to port 5 (IMP1) and LAN traffic goes to
port 8 (IMP0). While all 3 ports support Broadcom header some features
are not available for ports 5 and 7. Trying to set EAP mode when using
those ports breaks standalone ports.

Fixes: 4227ea91e265 ("net: dsa: b53: prevent standalone from trying to forward to other ports")
Cc: Semih Baskan <strst.gs@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
This fixes a regression. A very similar fix was carried by OpenWrt for
about half a year now.

A recent discussion in
[PATCH net 0/2] net: dsa: b53: fix 8021q uppers on standalone ports
allowed understanding the issue a bit better so I decided to send an
upstream PATCH finally.

 drivers/net/dsa/b53/b53_common.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 3f5b9592794d..4b4a9258ecd4 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -332,6 +332,21 @@ static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
 {
 	u64 eap_conf;
 
+	/*
+	 * Northstar devices (SoCs with BCM53011 / BCM53012) have 3 Ethernet
+	 * controllers connected to 3 switch ports: 5 (IMP1), 7 and 8 (IMP0).
+	 * Each of those ports can be used as CPU one as all support Broadcom
+	 * header but ports 5 and 7 have some limitations.
+	 *
+	 * Setting EAP_MODE_SIMPLIFIED with port 5/7 used as CPU port breaks
+	 * standalone ports, see:
+	 * https://lore.kernel.org/netdev/ce4d9b7b-aaf6-4796-94fb-8c3d6a1dcd4d@gmail.com/
+	 */
+	if (is5301x(dev) && !dsa_is_cpu_port(dev->ds, B53_CPU_PORT)) {
+		dev_warn_once(dev->dev, "skipping EAP setup because of not using CPU port 8\n");
+		return;
+	}
+
 	if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
 		return;
 
-- 
2.51.0


             reply	other threads:[~2026-08-09  9:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09  9:39 Rafał Miłecki [this message]
2026-08-09 10:22 ` [PATCH net] net: dsa: b53: skip EAP mode setup on Northstar SoCs when using port 5 or 7 Semih Baskan
2026-08-09 10:39 ` Jonas Gorski
2026-08-09 15:00   ` Andrew Lunn
2026-08-09 17:48     ` Florian Fainelli

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=20260809093934.28098-1-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=rafal@milecki.pl \
    --cc=strst.gs@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