Skip to content

Commit c511807

Browse files
martinwilliPaolo Abeni
authored andcommitted
net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports
Broadcom switches supported by the b53 driver use a chip-wide jumbo frame configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When setting the MTU for a user port, the chip-wide setting is reduced to not include the tagger overhead, resulting in an potentially insufficient chip-wide maximum frame size for the CPU port. As, by design, the CPU port MTU is adjusted for any user port change, apply the chip-wide setting only for CPU ports. This aligns the driver to the behavior of other switch drivers. Fixes: 6ae5834 ("net: dsa: b53: add MTU configuration support") Suggested-by: Vladimir Oltean <[email protected]> Signed-off-by: Martin Willi <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 66b6095 commit c511807

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,9 @@ static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu)
22562256
if (is5325(dev) || is5365(dev))
22572257
return -EOPNOTSUPP;
22582258

2259+
if (!dsa_is_cpu_port(ds, port))
2260+
return 0;
2261+
22592262
enable_jumbo = (mtu >= JMS_MIN_SIZE);
22602263
allow_10_100 = (dev->chip_id == BCM583XX_DEVICE_ID);
22612264

0 commit comments

Comments
 (0)