]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: airoha: fix max receive size configuration
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 25 Jun 2026 06:49:23 +0000 (08:49 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Jun 2026 09:10:10 +0000 (11:10 +0200)
commita7c6debfec17381329b094bd75560a1e57a5533a
treeb4e013476452db6f4b227d3b96fdcc4f98a38c31
parentd288efa2b94abc2e45a061fceb156b4f4e5b37be
net: airoha: fix max receive size configuration

Set the GDM maximum receive size to AIROHA_MAX_RX_SIZE unconditionally
during hardware initialization instead of updating it according to the
configured MTU. This avoids dropping incoming frames that exceed the
current MTU but could still be processed by the networking stack, which
is able to fragment the reply on the TX side (e.g. ICMP echo requests).
Move the per-port MTU configuration to the PPE egress path where it
belongs, and set the tx frame size running airoha_ppe_set_xmit_frame_size()
to dynamically track the maximum MTU across running interfaces sharing
the same PPE instance.
Fix the PPE MTU register addressing to pack two port entries per
register word and add WAN_MTU0 configuration for non-LAN GDM devices.

Fixes: 54d989d58d2a ("net: airoha: Move min/max packet len configuration in airoha_dev_open()")
Tested-by: Madhur Agrawal <madhur.agrawal@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260625-airoha-fix-rx-max-len-v1-1-45b9b827358d@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/airoha/airoha_eth.c
drivers/net/ethernet/airoha/airoha_eth.h
drivers/net/ethernet/airoha/airoha_ppe.c
drivers/net/ethernet/airoha/airoha_regs.h