Skip to content

Commit 66b6095

Browse files
martinwilliPaolo Abeni
authored andcommitted
net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports
Marvell chips not supporting per-port jumbo frame size configurations use a chip-wide frame size 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 maximum frame size for the CPU port. Specifically, sending full-size frames from the CPU port on a MV88E6097 having a user port MTU of 1500 bytes results in dropped frames. As, by design, the CPU port MTU is adjusted for any user port change, apply the chip-wide setting only for CPU ports. Fixes: 1baf0fa ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU") 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 4e076ff commit 66b6095

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+2
-1
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3626,7 +3626,8 @@ static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
36263626
mv88e6xxx_reg_lock(chip);
36273627
if (chip->info->ops->port_set_jumbo_size)
36283628
ret = chip->info->ops->port_set_jumbo_size(chip, port, new_mtu);
3629-
else if (chip->info->ops->set_max_frame_size)
3629+
else if (chip->info->ops->set_max_frame_size &&
3630+
dsa_is_cpu_port(ds, port))
36303631
ret = chip->info->ops->set_max_frame_size(chip, new_mtu);
36313632
mv88e6xxx_reg_unlock(chip);
36323633

0 commit comments

Comments
 (0)