kernel_samsung_a53x/drivers/net/ethernet
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
..
3com Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8390 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adaptec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aeroflex Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
agere Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
alacritech Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
allwinner Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
alteon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
amazon net: ena: Fix XDP redirection error 2024-11-18 12:11:49 +01:00
amd amd-xgbe: propagate the correct speed and duplex status 2024-11-18 12:10:55 +01:00
apm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apple Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aquantia net: atlantic: fix double free in ring reinit logic 2024-11-18 12:11:49 +01:00
arc Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
atheros ethernet: atheros: fix a memleak in atl1e_setup_ring_resources 2024-11-18 12:11:59 +01:00
aurora Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
broadcom bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters() 2024-11-18 12:12:07 +01:00
brocade Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cadence Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
calxeda Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cavium Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
chelsio chtls: fix tp->rcv_tstamp initialization 2024-11-18 11:42:50 +01:00
cirrus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cisco Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cortina net: ethernet: cortina: Fix MTU max setting 2024-11-18 11:43:20 +01:00
davicom Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
dec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dlink Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emulex net: vlan: introduce skb_vlan_eth_hdr() 2024-11-18 12:11:48 +01:00
ezchip Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
faraday Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
freescale net: fec: correct queue selection 2024-11-18 12:11:49 +01:00
fujitsu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
google gve: Use size_add() in call to struct_size() 2024-11-18 11:42:47 +01:00
hisilicon net: vlan: introduce skb_vlan_eth_hdr() 2024-11-18 12:11:48 +01:00
huawei Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i825xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel i40e: Restore VF MSI-X state during PCI reset 2024-11-18 12:12:07 +01:00
marvell octeontx2-af: Fix marking couple of structure as __packed 2024-11-18 12:12:06 +01:00
mediatek net: ethernet: mtk_eth_soc: remove duplicate if statements 2024-11-18 12:12:45 +01:00
mellanox net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors 2024-11-18 12:11:58 +01:00
micrel net: ks8851: Fix TX stall caused by TX buffer overrun 2024-11-18 12:12:01 +01:00
microchip Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
moxa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mscc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myricom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
natsemi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neterion Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netronome Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ni Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvidia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nxp Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
oki-semi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
packetengines Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pasemi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pensando ionic: Fix dim work handling in split interrupt mode 2024-11-18 12:11:39 +01:00
qlogic net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues 2024-11-18 12:12:07 +01:00
qualcomm net: qualcomm: rmnet: fix global oob in rmnet_policy 2024-11-18 12:12:51 +01:00
rdc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
realtek r8169: fix rtl8125b PAUSE frames blasting when suspended 2024-11-18 12:11:48 +01:00
renesas net: ravb: Start TX queues after HW initialization succeeded 2024-11-18 12:11:11 +01:00
rocker Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
seeq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sfc sfc: fix a double-free bug in efx_probe_filters 2024-11-18 12:12:06 +01:00
sgi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
silan Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sis Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
socionext Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
stmicro net: stmmac: Handle disabled MDIO busses from devicetree 2024-11-18 12:11:49 +01:00
sun Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synopsys Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tehuti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames 2024-11-18 12:12:51 +01:00
toshiba net: spider_net: Use size_add() in call to struct_size() 2024-11-18 11:42:47 +01:00
tundra Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wiznet Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
xilinx net: axienet: Fix check for partial TX checksum 2024-11-18 12:10:55 +01:00
xircom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xscale Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dnet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dnet.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ec_bhf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ethoc.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
fealnx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jme.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
korina.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lantiq_etop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lantiq_xrx200.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00