🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18178

Re: [PATCH net-next 4/9] dt-bindings: net: describe the Northstar flow accelerator

#18178
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 23:29
171 lines
14459 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 2

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The flow-accelerator register resource in brcm,bcm4708-fa.yaml
  is modelled as a standalone MMIO block with only `compatible` and…
- [Low] The new brcm,bcm5301x-gmac.yaml schema is selected only when the
  `brcm,flow-accelerator` property is present (`select: required:…
- [Low] The FA binding description calls switch port 5 'IMP5' ('Switch
  port 5 (IMP5), connected to GMAC0, ...').

--

dt-bindings: net: describe the Northstar flow accelerator

This commit adds a binding for the register block of the
BCM4708/BCM53011/BCM53012 flow accelerator. It also adds a schema for the
brcm,flow-accelerator phandle on the GMAC2 BCMA Ethernet node. The
description covers the second CPU path, port 5 to GMAC0, for exceptions
that bypass the accelerator.

> diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4708-fa.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4708-fa.yaml
> new file mode 100644
> index 0000000000000..f744b23433c46
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/brcm,bcm4708-fa.yaml
> @@ -0,0 +1,45 @@

[ ... ]

> +description: |
> +  The flow accelerator is inline between GMAC2 and switch port 8 (IMP0).
> +  GMAC0 and GMAC1 bypass it. The GMAC2 BCMA Ethernet node references this
> +  register block through a brcm,flow-accelerator phandle. Miss packets carry
> +  a prepended accelerator descriptor in place of the embedded switch tag.
> +
> +  Switch port 5 (IMP5), connected to GMAC0, provides a second CPU path for

[Severity: Low]
Should this say IMP1 instead of IMP5? The b53 SRAB code calls the two IMP
ports IMP0 (port 8) and IMP1 (port 5):

drivers/net/dsa/b53/b53_srab.c:
#define  B53_SRAB_IMP1_SLEEP_TIMER	BIT(10)
#define  B53_SRAB_P7_SLEEP_TIMER	BIT(11)
#define  B53_SRAB_IMP0_SLEEP_TIMER	BIT(12)

This description already uses IMP0 for port 8.

> +  exceptions that must bypass the accelerator, including TCP control,
> +  low-TTL and oversized packets. Describe that CPU port with an ethernet
> +  phandle to GMAC0 and an internal, 1 Gbps full-duplex fixed link in the
> +  switch's ports node. Port 8 remains the data connection to GMAC2.

[ ... ]

> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    flow-accelerator@18027c00 {
> +        compatible = "brcm,bcm53011-fa";
> +        reg = <0x18027c00 0xc0>;
> +    };

[Severity: Medium]
Can the flow accelerator be treated as a standalone MMIO block? The example
address 0x18027c00 falls inside the 4 KiB BCMA window of GMAC core unit 3.
bcm-ns.dtsi already describes that core under the 0x18000000 axi bus:

arch/arm/boot/dts/broadcom/bcm-ns.dtsi:
		gmac3: ethernet@27000 {
			reg = <0x27000 0x800>;
		};

The binding allows only compatible and reg. It has no clocks or resets
and no link to the GMAC3 core. It also does not say that the hosting core
must be out of reset and clocked.

Later in the series, bcm_ns_fa_init() in
drivers/net/ethernet/broadcom/bcm-ns-fa.c maps this node and writes to it
straight away:

	np = of_parse_phandle(parent->of_node, "brcm,flow-accelerator", 0);
	...
	fa->regs = devm_ioremap_resource(parent, &res);
	...
	writel(0, fa->regs + FA_STATUS_MASK);

Nothing in bgmac or bcm-ns-fa calls bcma_core_enable() on core unit 3.
bgmac_probe() also rejects core_unit 3 when that core has no MAC address,
so it never gets enabled there.

Suppose the bootloader leaves the GMAC3 wrapper in reset or clock-gated.
Could bgmac_probe() for GMAC2 -> bcm_ns_fa_init() -> writel() then take
an imprecise external abort or hang the bus? And if something later resets
the GMAC3 wrapper, would that wipe the programmed FA state?

This is inferred from how AI wrappers usually behave. I have not checked
it against the Northstar register map, so I can't confirm that GMAC3
hosts the FA. On BCM53012 boards where CFE leaves core 3 enabled, it may
work as is.

Should the binding describe how the FA relates to its hosting core, or
the clocks and resets it depends on?

> diff --git a/Documentation/devicetree/bindings/net/brcm,bcm5301x-gmac.yaml b/Documentation/devicetree/bindings/net/brcm,bcm5301x-gmac.yaml
> new file mode 100644
> index 0000000000000..76fbe2abf5152
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/brcm,bcm5301x-gmac.yaml
> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/brcm,bcm5301x-gmac.yaml#

[ ... ]

> +select:
> +  required:
> +    - brcm,flow-accelerator
> +
> +properties:
> +  brcm,flow-accelerator:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: |
> +      Phandle to the BCM4708, BCM53011 or BCM53012 inline flow accelerator.
> +      Only GMAC2 (BCMA Ethernet core unit 2) has this connection.
> +
> +additionalProperties: true

[Severity: Low]
The "Only GMAC2" restriction exists only in the description text. The
schema is selected purely by the presence of the property, and it sets
additionalProperties: true. Wouldn't a DT that puts brcm,flow-accelerator
on gmac0 (ethernet@24000), gmac1 or gmac3 still pass dt_binding_check and
dtbs_check?

Nothing checks that the phandle points to a brcm,*-fa node either.

Later in the series, bgmac_probe() in bgmac-bcma.c enforces the rule at
runtime:

	if (of_property_present(core->dev.of_node, "brcm,flow-accelerator") &&
	    core->core_unit != 2)
		return -EINVAL;

So a misplaced phandle makes that GMAC fail to probe, and dtbs_check gives
no warning beforehand.

Separately, the file name and $id suggest a brcm,bcm5301x-gmac compatible,
but the BCMA GMAC nodes have no compatible. Is that naming intended?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116222519.1416501-1-florian.fainelli%40broadcom.com
Technical Details
Message-ID: <179495816151.3136.14110323389854628043@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365700-linux-kernel-netdev=dewy.ru
References: <20261116222519.1416501-5-florian.fainelli@broadcom.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365700-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 4/9] dt-bindings: net: describe the Northstar
 flow accelerator
Date: Tue, 17 Nov 2026 23:29:21 +0000
Organization: Usenet Network
Message-ID: <179495816151.3136.14110323389854628043@kernel.org>
References: <20261116222519.1416501-5-florian.fainelli@broadcom.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2454085"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Q1eznTR7Od7YkYG4j9cI7X+rts4= sha256:FC7vOVAPnJfCHm03/KOkCIVGfcH3B065Ku64MjKnKbY=
	sha1:SXRLt2MA8yfP+QpPG7Oox445qFg= sha256:bGJlMRT952LIxIXCgjnDaihG2RRguTZRBIAlZWaUlF8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 7DCFD1150F5; Wed, 18 Nov 2026 02:29:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id iG0jZYJOG8_I;
	Wed, 18 Nov 2026 02:29:52 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365700-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 6DC8D1150F1; Wed, 18 Nov 2026 02:29:44 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 6175846239; Tue, 17 Nov 2026 23:29:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794958169;
	b=15WNVYzuu6XO3eetPWDpKVrgXDxQXvY+UHPp8UgWHF17A+UmHunldYWeIPtJevLntrUd
	 Wn/PqKTPAZYJaFE4zbuhFhxI0/viEPH9gbAoD2MHoUbF2oNDHFZ+AOXSY9eu1qWke2e4k
	 F22weh3VtOD7lhdQ1u8KgkZM35ZgUhpOAhZ9uEQyw1eJAWDavXjGKLP7oTdvYLhahJQMR
	 vcmmB2lSq/crgTmcPBUHwOfS2EEwZIeye1zA/p4d8FXqDU1vEaFkS3PDDzStk/LmnDcqx
	 Ix2w1tJZjky+saEyEHsh/ybQpR9KLWoDvAGt4kWMoPeqy0XYETS+1fxmpEd+6ykSz1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794958169;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=7czCLb61MQ7e2lVrfFvuytX7334qaL/vl9LcdBlRFs4=;
	b=bN+kzIZ1p+qtjB5dvs3RufYwDikASIGOrsi6wg36id5I2iNZjOEIQTn0wUbXWz8N/O8r
	 X+57uadChLSd7VH2QbiauJ7QOa0lU+fplhVVMBkqKIbEvki16jFiv55XkECFcp0tFQp2u
	 irWreoDj//6dj2pXz8C1ypOOSZ+ecodiGpjeYOThzUmsUVCavxVSSXMzmNs4/sSizk5m8
	 +N8Gkz84YfUtrrjSn/XLNu392XHkqlvhPjMeEBVMT98vUUllsz70IUvHv8S0dUOJgrkAt
	 QWL33uOvHhggkj1VUsimNJL5nK6Z9HsSJb/yeAo0UW9vNWF3RN5GFIyeDf6kxxBn2cw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HY7fticU;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DBCF606A32F;
	Tue, 17 Nov 2026 23:29:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HY7fticU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794958163;
	b=GaDos1lruJgX1m6bb45rWKC7FKJSQzN/4x/ZZMmoZv+IZMi0vuNTELT7Ea0NBSbCRlwy
	 +vY5VSxx8Hnvtq06xj5A5jjsUATKMWMwUJ91GmgUWNIlUHqhrICO/XkneY9xyJIk/kwpI
	 TxHjlyNgNVwDSayn3q2/Ta5lqZsh+QkgkSPteAgQidjGj+nhDVyTf/NJiI/kwgItvXO1w
	 ZaxQ8Ds/l4bVPXFT2ABqXn42bBlgAiOXgqlUYyU27Kc38i2ZvTFTBeXA9lETqCzUcxczY
	 s9vlG8zn24VA1pcspz8s3xz7EYXhyljoVBM8HOH54PF3gRHK15dhI9XDw9xhUnajtZQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794958163;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=7czCLb61MQ7e2lVrfFvuytX7334qaL/vl9LcdBlRFs4=;
	b=XDzfqnNE9dcNkd4+iTb/rELtMjCSiN/kAAXgcxtnh9T8G+sy1QN5jumGqWqQtgSTNRkU
	 f6PL7xdw1H/NF6d8IBIwpXxT/dK8PtAee/aTZhX1es8CkbbkVg7ym4mxkheuTys/RECPA
	 0/dhLyYzPGRLcjrVu3v3aQUbZbkEY7Q6G4ppOqaJ2yc+ZU4zXKrRkUM4homyKsu5ZfFZv
	 G83IU9+wBF+BQopgIDRTol48ZNPqKb0kNpfSKcxaQaa/xQOQDRsIauEdkKGiiYzGgnllq
	 jhgSBVIYhmhISIDtKsEqeAdTIj8JFRRh4uDlBsWJX5PYVpg1b62H59yVIQquRm0oZ0g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HY7fticU;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAAD0606A33F;
	Tue, 17 Nov 2026 23:29:23 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF4811F000C4;
	Tue, 17 Nov 2026 23:29:21 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794958163;
	bh=7czCLb61MQ7e2lVrfFvuytX7334qaL/vl9LcdBlRFs4=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=HY7fticU0ncnVtnMX8BdBAlFhAwzYEMRXLhpGcJ75TxgcuftNn0RVTD3YF/TlwVQW
	 M1uFQddpe6EM4kh9ZAp381qbW2Jc16telpftmXHXrHfFfTqgYpX0ybNdEqNs8zYmTn
	 hP/yYKveNH/sEmMfLukd0yV6A9LQ3xD3wV2FliPa3LfPeQNUC2Zf//xlJeBNE7vXuw
	 2dp/5SjfsQDjijd7yVUZhZS3ZrF1VnEGl9IawXgaxJiBBg4Xa+OCLw/RLbrog0Kuw/
	 /O5rAg7TkAm9ZTGAvrR/Gf+yjOBl6AjNAHV51kRNo+hnt7AdzHddF+IGKeMc6G4t4c
	 Dzc3d+W0gkU9w==
X-Cc: netdev@vger.kernel.org, rafal@milecki.pl,
 bcm-kernel-feedback-list@broadcom.com, andrew+netdev@lunn.ch,
 davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, horms@kernel.org,
 corbet@lwn.net, jonas.gorski@gmail.com, olteanv@gmail.com,
 pablo@netfilter.org, fw@strlen.de, phil@nwl.cc, devicetree@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
 netfilter-devel@vger.kernel.org, coreteam@netfilter.org
X-In-Reply-To: <20261116222519.1416501-5-florian.fainelli@broadcom.com>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list