>From 2eb596d0486adc5954f6d9263f153afddb3e470b Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Fri, 13 Oct 2023 17:37:23 +0300 Subject: [PATCH 2/2] dpaa2-eth: set needed_headroom to the maximum value needed Set the needed_headroom net device field to the maximum value that the driver would need on the Tx path: - 64 bytes for the software annotation area - 64 bytes for the hardware annotation area - 64 bytes to account for a 64 byte aligned buffer address Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 5442d0e5fd66..9f029f3fe909 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4969,6 +4969,8 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) if (err) goto err_dl_port_add; + net_dev->needed_headroom = DPAA2_ETH_SWA_SIZE + DPAA2_ETH_TX_HWA_SIZE + DPAA2_ETH_TX_BUF_ALIGN; + err = register_netdev(net_dev); if (err < 0) { dev_err(dev, "register_netdev() failed\n"); -- 2.25.1