]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: fec: remove rx_align from fec_enet_private
authorWei Fang <wei.fang@nxp.com>
Wed, 19 Nov 2025 02:51:47 +0000 (10:51 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Nov 2025 02:40:07 +0000 (18:40 -0800)
commit3bb06c8a461b8c8714eef5094b1fadd2d066dd1a
tree3a48cfada24e85bc961d635dfbf95a00f15e4147
parent63083d597adabffd12ecb879dbae3556e87ee277
net: fec: remove rx_align from fec_enet_private

The rx_align was introduced by the commit 41ef84ce4c72 ("net: fec: change
FEC alignment according to i.mx6 sx requirement"). Because the i.MX6 SX
requires RX buffer must be 64 bytes alignment.

Since the commit 95698ff6177b ("net: fec: using page pool to manage RX
buffers"), the address of the RX buffer is always the page address plus
FEC_ENET_XDP_HEADROOM which is 256 bytes, so the RX buffer is always
64-byte aligned. Therefore, rx_align has no effect since that commit,
and we can safely remove it.

In addition, to prevent future modifications to FEC_ENET_XDP_HEADROOM,
a BUILD_BUG_ON() test has been added to the driver, which ensures that
FEC_ENET_XDP_HEADROOM provides the required alignment.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20251119025148.2817602-5-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c