mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
net: fec: update MAX_FL based on the current MTU
Configure the MAX_FL (Maximum Frame Length) register according to the current MTU value, which ensures that packets exceeding the configured MTU trigger an RX error. Reviewed-by: Wei Fang <wei.fang@nxp.com> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> Link: https://patch.msgid.link/20250910185211.721341-4-shenwei.wang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
29e6d5f89e
commit
62b5bb7be7
@@ -1149,7 +1149,7 @@ fec_restart(struct net_device *ndev)
|
||||
u32 rcntl = FEC_RCR_MII;
|
||||
|
||||
if (OPT_ARCH_HAS_MAX_FL)
|
||||
rcntl |= fep->max_buf_size << 16;
|
||||
rcntl |= (fep->netdev->mtu + ETH_HLEN + ETH_FCS_LEN) << 16;
|
||||
|
||||
if (fep->bufdesc_ex)
|
||||
fec_ptp_save_state(fep);
|
||||
|
||||
Reference in New Issue
Block a user