kernel_samsung_a53x/drivers/net/ethernet/ti
Sanjuán García, Jorge a1e4f4d11d net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames
[ Upstream commit 64e47d8afb5ca533b27efc006405e5bcae2c4a7b ]

The value of AM65_CPSW_MAX_PACKET_SIZE represents the maximum length
of a received frame. This value is written to the register
AM65_CPSW_PORT_REG_RX_MAXLEN.

The maximum MTU configured on the network device should then leave
some room for the ethernet headers and frame check. Otherwise, if
the network interface is configured to its maximum mtu possible,
the frames will be larger than AM65_CPSW_MAX_PACKET_SIZE and will
get dropped as oversized.

The switch supports ethernet frame sizes between 64 and 2024 bytes
(including VLAN) as stated in the technical reference manual, so
define AM65_CPSW_MAX_PACKET_SIZE with that maximum size.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Jorge Sanjuan Garcia <jorge.sanjuangarcia@duagon.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://lore.kernel.org/r/20240105085530.14070-2-jorge.sanjuangarcia@duagon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:51 +01:00
..
am65-cpsw-ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am65-cpsw-nuss.c net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames 2024-11-18 12:12:51 +01:00
am65-cpsw-nuss.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am65-cpsw-qos.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am65-cpsw-qos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am65-cpts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am65-cpts.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw-phy-sel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
cpsw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_ale.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_ale.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_new.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
cpsw_priv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_priv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_sl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_sl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_switchdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpsw_switchdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpts.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
davinci_cpdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
davinci_cpdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
davinci_emac.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
davinci_mdio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
k3-cppi-desc-pool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
k3-cppi-desc-pool.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netcp_core.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
netcp_ethss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netcp_sgmii.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netcp_xgbepcsr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00