difos/target/linux/generic/backport-6.12/612-06-v6.17-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
Álvaro Fernández Rojas 0bd694ea22 generic: 6.12: backport accepted BCM5325 patches
Backport accepted BCM5325 patches from net-next.
These patches will be merged in the v6.17 kernel window.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-18 11:11:54 +02:00

51 lines
1.5 KiB
Diff

From 9b6c767c312b4709e9aeb2314a6b47863e7fb72d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Sat, 14 Jun 2025 09:59:52 +0200
Subject: [PATCH] net: dsa: b53: prevent FAST_AGE access on BCM5325
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
BCM5325 doesn't implement FAST_AGE registers so we should avoid reading or
writing them.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250614080000.1884236-7-noltari@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/dsa/b53/b53_common.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -487,6 +487,9 @@ static int b53_flush_arl(struct b53_devi
{
unsigned int i;
+ if (is5325(dev))
+ return 0;
+
b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_CTRL,
FAST_AGE_DONE | FAST_AGE_DYNAMIC | mask);
@@ -511,6 +514,9 @@ out:
static int b53_fast_age_port(struct b53_device *dev, int port)
{
+ if (is5325(dev))
+ return 0;
+
b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_PORT_CTRL, port);
return b53_flush_arl(dev, FAST_AGE_PORT);
@@ -518,6 +524,9 @@ static int b53_fast_age_port(struct b53_
static int b53_fast_age_vlan(struct b53_device *dev, u16 vid)
{
+ if (is5325(dev))
+ return 0;
+
b53_write16(dev, B53_CTRL_PAGE, B53_FAST_AGE_VID_CTRL, vid);
return b53_flush_arl(dev, FAST_AGE_VLAN);