Devicetree
 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 13/17] ARM: dts: BCM5301X: Buffalo: use gmac2
Date: Wed, 18 Nov 2026 06:06:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-220205@kernel.org> (raw)
In-Reply-To: <20261118054758.132233-14-rosenp@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ARM: dts: bcm5301x: missing gmac2 MAC address on Buffalo
  switch port 8
--

commit 6598066c57888a377c2571d52762ecf08eda69ee
Author: Rosen Penev <rosenp@gmail.com>

ARM: dts: BCM5301X: Buffalo: use gmac2

This commit switches the DSA CPU port from switch port 5 (gmac0) to port 8
(gmac2) on the Buffalo WZR-600DHP2, WZR-1166DHP, and WZR-1166DHP2 routers.

> 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 9f9084269ef58..2f1d49733f092 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
> @@ -179,7 +179,7 @@ port@4 {
>  		};
>  
>  		port@5 {
> -			label = "cpu";
> +			status = "disabled";
>  		};
>  
>  		port@7 {
> @@ -187,7 +187,7 @@ port@7 {
>  		};
>  
>  		port@8 {
> -			status = "disabled";
> +			label = "cpu";
>  		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts b/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
> index 192b8db5a89c3..47670b9bfb799 100644
> --- a/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
> @@ -143,7 +143,7 @@ port@4 {
>  		};
>  
>  		port@5 {
> -			label = "cpu";
> +			status = "disabled";
>  		};
>  
>  		port@7 {
> @@ -151,7 +151,7 @@ port@7 {
>  		};
>  
>  		port@8 {
> -			status = "disabled";
> +			label = "cpu";
>  		};
>  	};
>  };

[Severity: Medium]
Does switching the CPU port from port@5 (gmac0) to port@8 (gmac2) without
assigning a MAC address to gmac2 in the device tree cause these boards to
fall back to a random MAC address on every boot?

When no MAC address is specified in the device tree, bgmac_probe() falls
back to the BCMA SPROM indexed by core_unit:

drivers/net/ethernet/broadcom/bgmac-bcma.c:bgmac_probe() {
	...
	/* If no MAC address assigned via device tree, check SPROM */
	if (err) {
		switch (core->core_unit) {
		case 0:
			mac = sprom->et0mac;
			break;
		case 1:
			mac = sprom->et1mac;
			break;
		case 2:
			mac = sprom->et2mac;
			break;
	...
}

Previously, port@5 used gmac0 (core_unit 0), which obtained the factory MAC
address from sprom->et0mac (NVRAM et0macaddr).  Because neither DTS defines
nvmem-cells on gmac2 (core_unit 2), gmac2 reads sprom->et2mac (NVRAM
et2macaddr), which is unset on these boards.  As a result,
bgmac_enet_probe() generates a random MAC address for gmac2, and
dsa_user_create() inherits that random MAC address for all switch user
ports (lan1-lan4 and wan).

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

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

Thread overview: 19+ 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 [this message]
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

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-220205@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox