Merge branch 'net-dsa-fix-chip-wide-frame-size-config-in-some-drivers'
Martin Willi says: ==================== net: dsa: Fix chip-wide frame size config in some drivers Some DSA chips support a chip-wide frame size configurations, only. Some drivers adjust that chip-wide setting for user port changes, overriding the frame size requirements on the CPU port that includes tagger overhead. Fix the mv88e6xxx and b53 drivers and align them to the behavior of other drivers. v2: - Skip chip-wide config for non-CPU ports instead of finding the maximim MTU over all ports - Add a patch fixing the b53 driver as well v1: https://lore.kernel.org/netdev/20240716120808.396514-1-martin@strongswan.org/ ==================== Link: https://patch.msgid.link/20240717090820.894234-1-martin@strongswan.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
269521e250
@ -2256,6 +2256,9 @@ static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu)
|
||||
if (is5325(dev) || is5365(dev))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!dsa_is_cpu_port(ds, port))
|
||||
return 0;
|
||||
|
||||
enable_jumbo = (mtu >= JMS_MIN_SIZE);
|
||||
allow_10_100 = (dev->chip_id == BCM583XX_DEVICE_ID);
|
||||
|
||||
|
@ -3626,7 +3626,8 @@ static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
|
||||
mv88e6xxx_reg_lock(chip);
|
||||
if (chip->info->ops->port_set_jumbo_size)
|
||||
ret = chip->info->ops->port_set_jumbo_size(chip, port, new_mtu);
|
||||
else if (chip->info->ops->set_max_frame_size)
|
||||
else if (chip->info->ops->set_max_frame_size &&
|
||||
dsa_is_cpu_port(ds, port))
|
||||
ret = chip->info->ops->set_max_frame_size(chip, new_mtu);
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user