* [PATCH net 0/5] net: dsa: b53: Preliminary fixes
@ 2026-10-27 20:22 Florian Fainelli
2026-10-27 20:22 ` [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
This patch series contains fixes to issues reported by Sashiko on the
b53 PCS bug fixes being submitted, and then some more that came from
code review and testing.
Florian Fainelli (5):
net: dsa: b53: initialize the jumbo frame size register offset
net: dsa: b53: fix the SRAB grant timeout check
net: dsa: b53: clear stale state when creating an ARL entry
net: dsa: b53: reject conflicting mirror destinations
net: dsa: b53: use the correct override register 2 Gbps bit
drivers/net/dsa/b53/b53_common.c | 42 ++++++++++++++++++++++----------
drivers/net/dsa/b53/b53_srab.c | 2 +-
2 files changed, 30 insertions(+), 14 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
@ 2026-10-27 20:22 ` Florian Fainelli
2026-10-28 9:09 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
The chip data specifies both the jumbo port mask and frame size register
offsets, but b53_switch_init() only copies the former into the device.
Since the device is zero-initialized, b53_set_jumbo() writes the frame
size to offset zero instead of the chip-specific size register at 0x05
or 0x08.
Copy jumbo_size_reg from the chip data along with jumbo_pm_reg so frame
size updates reach the intended register.
Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/b53/b53_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 0880310c9ce3..559d4b360c82 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -3109,6 +3109,7 @@ static int b53_switch_init(struct b53_device *dev)
dev->vta_regs[1] = chip->vta_regs[1];
dev->vta_regs[2] = chip->vta_regs[2];
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
+ dev->jumbo_size_reg = chip->jumbo_size_reg;
dev->imp_port = chip->imp_port;
dev->num_vlans = chip->vlans;
dev->num_arl_bins = chip->arl_bins;
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
2026-10-27 20:22 ` [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
@ 2026-10-27 20:22 ` Florian Fainelli
2026-10-28 9:14 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
b53_srab_request_grant() polls for a grant up to 20 times, but checks for
an iteration count of five to detect a timeout. This rejects a grant
received on the sixth poll and reports success when all 20 polls finish
without a grant. The latter allows a register access to proceed without
ownership of the switch resources.
Check for exhaustion of all 20 iterations instead.
Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/b53/b53_srab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
index 83a03fca142a..f4689078ccd5 100644
--- a/drivers/net/dsa/b53/b53_srab.c
+++ b/drivers/net/dsa/b53/b53_srab.c
@@ -105,7 +105,7 @@ static int b53_srab_request_grant(struct b53_device *dev)
break;
usleep_range(10, 100);
}
- if (WARN_ON(i == 5))
+ if (WARN_ON(i == 20))
return -EIO;
return 0;
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
2026-10-27 20:22 ` [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
2026-10-27 20:22 ` [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
@ 2026-10-27 20:22 ` Florian Fainelli
2026-10-28 9:52 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
When an ARL lookup does not find the requested MAC and VID, b53_arl_read()
returns the first free bin index but leaves the entry populated with the
last bin examined. The multicast add path then ORs the requested port into
that unrelated entry's forwarding bitmap, potentially forwarding packets
to ports which are not members of the multicast group.
Clear the entry before creating a new one. Also return without writing
anything when deleting an entry which is not present, instead of making
a new entry from stale bin contents.
Fixes: 5d65b64a3d97 ("net: dsa: b53: Add support for MDB")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/b53/b53_common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 559d4b360c82..0871a10d8cbc 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1992,6 +1992,10 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
addr, vid);
return is_valid ? ret : 0;
case -ENOENT:
+ if (!is_valid)
+ return 0;
+
+ memset(&ent, 0, sizeof(ent));
/* We could not find a matching MAC, so reset to a new entry */
dev_dbg(dev->dev, "{%pM,%.4d} not found, using idx: %d\n",
addr, vid, idx);
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
` (2 preceding siblings ...)
2026-10-27 20:22 ` [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
@ 2026-10-27 20:22 ` Florian Fainelli
2026-10-28 9:56 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit Florian Fainelli
2026-10-27 20:26 ` [PATCH net 0/5] net: dsa: b53: Preliminary fixes netdev-bot+sinfo
5 siblings, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
The mirror capture control register selects one destination for all
ingress and egress mirror sources. Adding a rule for a different capture
port currently overwrites that field and silently redirects all existing
mirror rules.
Read the capture control before changing any source masks and reject a
different destination while mirroring is enabled. Return an extack which
describes the hardware limitation, and propagate a failed capture-control
read rather than making the decision from uninitialized data.
Clear the capture-port field when the final source is removed so a later
rule can select a new destination.
Fixes: ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/b53/b53_common.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 0871a10d8cbc..b8a7b380bac8 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -2543,7 +2543,19 @@ int b53_mirror_add(struct dsa_switch *ds, int port,
struct netlink_ext_ack *extack)
{
struct b53_device *dev = ds->priv;
- u16 reg, loc;
+ u16 reg, loc, cap_ctl;
+ int ret;
+
+ ret = b53_read16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, &cap_ctl);
+ if (ret)
+ return ret;
+
+ if ((cap_ctl & MIRROR_EN) &&
+ (cap_ctl & CAP_PORT_MASK) != mirror->to_local_port) {
+ NL_SET_ERR_MSG_MOD(extack,
+ "Only one mirroring destination is supported");
+ return -EOPNOTSUPP;
+ }
if (ingress)
loc = B53_IG_MIR_CTL;
@@ -2554,11 +2566,10 @@ int b53_mirror_add(struct dsa_switch *ds, int port,
reg |= BIT(port);
b53_write16(dev, B53_MGMT_PAGE, loc, reg);
- b53_read16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, ®);
- reg &= ~CAP_PORT_MASK;
- reg |= mirror->to_local_port;
- reg |= MIRROR_EN;
- b53_write16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, reg);
+ cap_ctl &= ~CAP_PORT_MASK;
+ cap_ctl |= mirror->to_local_port;
+ cap_ctl |= MIRROR_EN;
+ b53_write16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, cap_ctl);
return 0;
}
@@ -2595,10 +2606,8 @@ void b53_mirror_del(struct dsa_switch *ds, int port,
b53_read16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, ®);
/* Both no longer have ports, let's disable mirroring */
- if (loc_disable && other_loc_disable) {
- reg &= ~MIRROR_EN;
- reg &= ~mirror->to_local_port;
- }
+ if (loc_disable && other_loc_disable)
+ reg &= ~(MIRROR_EN | CAP_PORT_MASK);
b53_write16(dev, B53_MGMT_PAGE, B53_MIR_CAP_CTL, reg);
}
EXPORT_SYMBOL(b53_mirror_del);
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
` (3 preceding siblings ...)
2026-10-27 20:22 ` [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
@ 2026-10-27 20:22 ` Florian Fainelli
2026-10-28 9:58 ` Jonas Gorski
2026-10-27 20:26 ` [PATCH net 0/5] net: dsa: b53: Preliminary fixes netdev-bot+sinfo
5 siblings, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:22 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
open list
The IMP and per-port GMII override registers swap the override-enable and 2
Gbps speed bits. Using the IMP speed bit on a GMII port clears its override
enable and leaves any previous 2 Gbps selection intact. Select the speed
bit alongside the register and enable bit so lower speeds clear the correct
bit and 2 Gbps sets it.
Fixes: b6a8a5477fe9 ("net: dsa: b53: fix resetting speed and pause on forced link")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/b53/b53_common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index b8a7b380bac8..7bbbfcd611e1 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1370,17 +1370,19 @@ static void b53_force_port_config(struct b53_device *dev, int port,
int speed, int duplex,
bool tx_pause, bool rx_pause)
{
- u8 reg, val, off;
+ u8 reg, val, off, speed2000;
/* Override the port settings */
if (port == dev->imp_port) {
off = B53_PORT_OVERRIDE_CTRL;
val = PORT_OVERRIDE_EN;
+ speed2000 = PORT_OVERRIDE_SPEED_2000M;
} else if (is5325(dev)) {
return;
} else {
off = B53_GMII_PORT_OVERRIDE_CTRL(port);
val = GMII_PO_EN;
+ speed2000 = GMII_PO_SPEED_2000M;
}
b53_read8(dev, B53_CTRL_PAGE, off, ®);
@@ -1392,11 +1394,11 @@ static void b53_force_port_config(struct b53_device *dev, int port,
reg &= ~(0x3 << GMII_PO_SPEED_S);
if (is5301x(dev) || is58xx(dev))
- reg &= ~PORT_OVERRIDE_SPEED_2000M;
+ reg &= ~speed2000;
switch (speed) {
case 2000:
- reg |= PORT_OVERRIDE_SPEED_2000M;
+ reg |= speed2000;
fallthrough;
case SPEED_1000:
reg |= PORT_OVERRIDE_SPEED_1000M;
--
2.53.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 0/5] net: dsa: b53: Preliminary fixes
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
` (4 preceding siblings ...)
2026-10-27 20:22 ` [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit Florian Fainelli
@ 2026-10-27 20:26 ` netdev-bot+sinfo
2026-10-27 20:30 ` Florian Fainelli
5 siblings, 1 reply; 13+ messages in thread
From: netdev-bot+sinfo @ 2026-10-27 20:26 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 0/5] net: dsa: b53: Preliminary fixes
2026-10-27 20:26 ` [PATCH net 0/5] net: dsa: b53: Preliminary fixes netdev-bot+sinfo
@ 2026-10-27 20:30 ` Florian Fainelli
0 siblings, 0 replies; 13+ messages in thread
From: Florian Fainelli @ 2026-10-27 20:30 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: netdev, Jonas Gorski, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, Russell King (Oracle),
linux-kernel
On 10/27/26 13:26, netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
Except for issue #2, all of the other issues did trigger in testing and
needed to be corrected.
--
Florian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset
2026-10-27 20:22 ` [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
@ 2026-10-28 9:09 ` Jonas Gorski
0 siblings, 0 replies; 13+ messages in thread
From: Jonas Gorski @ 2026-10-28 9:09 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
Russell King (Oracle),
open list
On Tue, Oct 27, 2026 at 9:22 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> The chip data specifies both the jumbo port mask and frame size register
> offsets, but b53_switch_init() only copies the former into the device.
> Since the device is zero-initialized, b53_set_jumbo() writes the frame
> size to offset zero instead of the chip-specific size register at 0x05
> or 0x08.
That offset is reserved, so (hopefully) was effectively just a NOP.
Which reminds me that I still don't really know what this register is
good for. The (bcm53115) datasheet says it's used when jumbo support
is disabled(?) to determine max good frame size for MIBs, but also
that it controls up to which lengths frames are admitted, then dropped
(and only allows the values 1518 and 2000).
I tried writing various values to it, and never managed to make it do
anything; neither did the switch start dropping frames longer than
that, nor did I see any effect on the MIB counters ... .
> Copy jumbo_size_reg from the chip data along with jumbo_pm_reg so frame
> size updates reach the intended register.
>
> Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
> ---
> drivers/net/dsa/b53/b53_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 0880310c9ce3..559d4b360c82 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -3109,6 +3109,7 @@ static int b53_switch_init(struct b53_device *dev)
> dev->vta_regs[1] = chip->vta_regs[1];
> dev->vta_regs[2] = chip->vta_regs[2];
> dev->jumbo_pm_reg = chip->jumbo_pm_reg;
> + dev->jumbo_size_reg = chip->jumbo_size_reg;
> dev->imp_port = chip->imp_port;
> dev->num_vlans = chip->vlans;
> dev->num_arl_bins = chip->arl_bins;
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check
2026-10-27 20:22 ` [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
@ 2026-10-28 9:14 ` Jonas Gorski
0 siblings, 0 replies; 13+ messages in thread
From: Jonas Gorski @ 2026-10-28 9:14 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
Russell King (Oracle),
open list
On Tue, Oct 27, 2026 at 9:22 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> b53_srab_request_grant() polls for a grant up to 20 times, but checks for
> an iteration count of five to detect a timeout. This rejects a grant
> received on the sixth poll and reports success when all 20 polls finish
> without a grant. The latter allows a register access to proceed without
> ownership of the switch resources.
>
> Check for exhaustion of all 20 iterations instead.
>
> Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry
2026-10-27 20:22 ` [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
@ 2026-10-28 9:52 ` Jonas Gorski
0 siblings, 0 replies; 13+ messages in thread
From: Jonas Gorski @ 2026-10-28 9:52 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
Russell King (Oracle),
open list
On Tue, Oct 27, 2026 at 9:22 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> When an ARL lookup does not find the requested MAC and VID, b53_arl_read()
> returns the first free bin index but leaves the entry populated with the
> last bin examined. The multicast add path then ORs the requested port into
> that unrelated entry's forwarding bitmap, potentially forwarding packets
> to ports which are not members of the multicast group.
>
> Clear the entry before creating a new one. Also return without writing
> anything when deleting an entry which is not present, instead of making
> a new entry from stale bin contents.
>
> Fixes: 5d65b64a3d97 ("net: dsa: b53: Add support for MDB")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> drivers/net/dsa/b53/b53_common.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 559d4b360c82..0871a10d8cbc 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -1992,6 +1992,10 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
> addr, vid);
> return is_valid ? ret : 0;
> case -ENOENT:
> + if (!is_valid)
> + return 0;
Should we return 0, or should we pass on the -ENOENT? We failed to
remove the entry, so implies there was a desync between hardware state
and software state.
If we don't, we should at least report the issue. If we do, we don't
need to, as dsa will do that. Though we then should also report
-ENOSPC && !is_valid as -ENOENT.
Likewise when trying to add an entry that already exists.
> +
> + memset(&ent, 0, sizeof(ent));
Just bikeshedding, but semantically it feels the memset should be
below the comment/dev_dbg().
> /* We could not find a matching MAC, so reset to a new entry */
> dev_dbg(dev->dev, "{%pM,%.4d} not found, using idx: %d\n",
> addr, vid, idx);
> --
> 2.53.0
>
Best regards,
Jonas
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations
2026-10-27 20:22 ` [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
@ 2026-10-28 9:56 ` Jonas Gorski
0 siblings, 0 replies; 13+ messages in thread
From: Jonas Gorski @ 2026-10-28 9:56 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
Russell King (Oracle),
open list
On Tue, Oct 27, 2026 at 9:22 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> The mirror capture control register selects one destination for all
> ingress and egress mirror sources. Adding a rule for a different capture
> port currently overwrites that field and silently redirects all existing
> mirror rules.
>
> Read the capture control before changing any source masks and reject a
> different destination while mirroring is enabled. Return an extack which
> describes the hardware limitation, and propagate a failed capture-control
> read rather than making the decision from uninitialized data.
>
> Clear the capture-port field when the final source is removed so a later
> rule can select a new destination.
>
> Fixes: ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit
2026-10-27 20:22 ` [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit Florian Fainelli
@ 2026-10-28 9:58 ` Jonas Gorski
0 siblings, 0 replies; 13+ messages in thread
From: Jonas Gorski @ 2026-10-28 9:58 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
Russell King (Oracle),
open list
On Tue, Oct 27, 2026 at 9:22 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> The IMP and per-port GMII override registers swap the override-enable and 2
> Gbps speed bits. Using the IMP speed bit on a GMII port clears its override
> enable and leaves any previous 2 Gbps selection intact. Select the speed
> bit alongside the register and enable bit so lower speeds clear the correct
> bit and 2 Gbps sets it.
>
> Fixes: b6a8a5477fe9 ("net: dsa: b53: fix resetting speed and pause on forced link")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-10-28 9:58 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 20:22 [PATCH net 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
2026-10-27 20:22 ` [PATCH net 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
2026-10-28 9:09 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 2/5] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
2026-10-28 9:14 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 3/5] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
2026-10-28 9:52 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 4/5] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
2026-10-28 9:56 ` Jonas Gorski
2026-10-27 20:22 ` [PATCH net 5/5] net: dsa: b53: use the correct override register 2 Gbps bit Florian Fainelli
2026-10-28 9:58 ` Jonas Gorski
2026-10-27 20:26 ` [PATCH net 0/5] net: dsa: b53: Preliminary fixes netdev-bot+sinfo
2026-10-27 20:30 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®