Patch "net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-mv88e6xxx-limit-chip-wide-frame-size-config-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 37f7bc2cbf7d3cbad57eca868a63f8b255b5974b
Author: Martin Willi <martin@xxxxxxxxxxxxxx>
Date:   Wed Jul 17 11:08:19 2024 +0200

    net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports
    
    [ Upstream commit 66b6095c264e1b4e0a441c6329861806504e06c6 ]
    
    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: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
    Suggested-by: Vladimir Oltean <olteanv@xxxxxxxxx>
    Signed-off-by: Martin Willi <martin@xxxxxxxxxxxxxx>
    Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 4938550a67c02..d94b46316a117 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3606,7 +3606,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);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux