All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 17/17] ARM: dts: BCM5301X: enable GMACs in boards that use them
Date: Wed, 18 Nov 2026 06:35:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-220260@kernel.org> (raw)
In-Reply-To: <20261118054758.132233-18-rosenp@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ARM: dts: BCM5301X: broken Ethernet and MAC lookup when
  switching to gmac2
--

commit 0269312535e53f643019e5fdace65a094482074d
Author: Rosen Penev <rosenp@gmail.com>

ARM: dts: BCM5301X: enable GMACs in boards that use them

This commit disables all four GMACs by default in bcm-ns.dtsi and enables
only the GMACs used by each board in the board device trees.

> diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
> index 707c8693b2829..850b74a0fe6af 100644
> --- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
> @@ -335,6 +335,8 @@ gmac0: ethernet@24000 {
>  			reg = <0x24000 0x800>;
>  			phy-mode = "internal";
>  
> +			status = "disabled";
> +
>  			fixed-link {
>  				speed = <1000>;
>  				full-duplex;

[ ... ]

> diff --git a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
> index 2f1d49733f092..6347ff72a334e 100644
> --- a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
> @@ -191,3 +191,7 @@ port@8 {
>  		};
>  	};
>  };
> +
> +&gmac2 {
> +	status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts
> index 95ef6ca7210b3..99f1c8ebf3ae9 100644
> --- a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts
> @@ -149,3 +149,7 @@ &spi_nor {
>  &usb3_phy {
>  	status = "okay";
>  };
> +
> +&gmac2 {
> +	status = "okay";
> +};

[Severity: High]
Does disabling gmac0 and enabling only gmac2 break Ethernet connectivity
and factory MAC address lookup on boards that do not enable srab or define
nvmem-cells on gmac2?

In bcm-ns.dtsi, srab has status = "disabled" by default.  On boards that
do not enable srab (such as bcm4708-buffalo-wzr-1750dhp,
bcm4708-linksys-ea6500-v2, bcm4708-netgear-r6300-v2, and others),
b53_srab_probe() never runs to configure switch port 8, leaving the
internal switch in the state set by CFE, which configures et0 (gmac0 /
port 5).  Disabling gmac0 and enabling only gmac2 leaves the sole active
GMAC connected to an unconfigured switch port.

In addition, on boards that do not specify nvmem-cells on gmac2 (including
switch-enabled boards like bcm4708-buffalo-wzr-1166dhp-common.dtsi,
bcm47081-buffalo-wzr-600dhp2.dts, bcm4708-netgear-r6250.dts, and
bcm953012er.dts), bgmac_probe() falls back to SPROM when
of_get_ethdev_address() fails:

drivers/net/ethernet/broadcom/bgmac-bcma.c:bgmac_probe() {
    ...
		switch (core->core_unit) {
		case 0:
			mac = sprom->et0mac;
			break;
		case 1:
			mac = sprom->et1mac;
			break;
		case 2:
			mac = sprom->et2mac;
			break;
    ...
}

Because gmac2 is core_unit 2, bgmac_probe() reads sprom->et2mac instead of
sprom->et0mac.  On boards whose NVRAM only provides et0macaddr,
sprom->et2mac is all-zeroes, so bgmac_enet_probe() rejects it and assigns
a random MAC address on every boot.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118054758.132233-1-rosenp@gmail.com?part=17

      reply	other threads:[~2026-11-18  6:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  5:47 [PATCH 00/17] ARM: dts: BCM5301X: describe switches and use gmac2 as the CPU port Rosen Penev
2026-11-18  5:47 ` [PATCH 01/17] ARM: dts: BCM5301X: AC56U: specify switch Rosen Penev
2026-11-18  5:47 ` [PATCH 02/17] ARM: dts: BCM5301X: AC68U: " Rosen Penev
2026-11-18  5:47 ` [PATCH 03/17] ARM: dts: BCM5301X: N18U: " Rosen Penev
2026-11-18  5:47 ` [PATCH 04/17] ARM: dts: BCM5301X: R7000: " Rosen Penev
2026-11-18  5:47 ` [PATCH 05/17] ARM: dts: BCM5301X: EA6300: set gmac2 MAC address from nvram Rosen Penev
2026-11-18  5:47 ` [PATCH 06/17] ARM: dts: BCM5301X: EA6300: specify switch Rosen Penev
2026-11-18  5:47 ` [PATCH 07/17] ARM: dts: BCM5301X: phicomm-k3: add nvram node Rosen Penev
2026-11-18  5:47 ` [PATCH 08/17] ARM: dts: BCM5301X: phicomm-k3: specify switch Rosen Penev
2026-11-18  5:47 ` [PATCH 09/17] ARM: dts: BCM5301X: AC87U: use gmac2 Rosen Penev
2026-11-18  5:47 ` [PATCH 10/17] ARM: dts: BCM5301X: SR400AC: " Rosen Penev
2026-11-18  5:47 ` [PATCH 11/17] ARM: dts: BCM5301X: DIR-885L: " Rosen Penev
2026-11-18  5:47 ` [PATCH 12/17] ARM: dts: BCM5301X: Luxul: " Rosen Penev
2026-11-18  5:47 ` [PATCH 13/17] ARM: dts: BCM5301X: Buffalo: " Rosen Penev
2026-11-18  6:06   ` sashiko-bot
2026-11-18  5:47 ` [PATCH 14/17] ARM: dts: BCM5301X: R6250: " Rosen Penev
2026-11-18  5:47 ` [PATCH 15/17] ARM: dts: BCM5301X: Meraki MR26/MR32: " Rosen Penev
2026-11-18  5:47 ` [PATCH 16/17] ARM: dts: BCM5301X: BCM953012ER: " Rosen Penev
2026-11-18  5:47 ` [PATCH 17/17] ARM: dts: BCM5301X: enable GMACs in boards that use them Rosen Penev
2026-11-18  6:35   ` sashiko-bot [this message]

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=sashiko-outbox-220260@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.