From: Karol Jurczenia When the network interface is brought down and ARP Offload is enabled, set the TE (Transmitter Enable) and RE (Receiver Enable) bits. Ensure that the Network Interface Card (NIC) can continue handling ARP responses in hardware even when the interface is down. Reviewed-by: Sebastian Basierski Reviewed-by: Cezary Rojewski Signed-off-by: Karol Jurczenia Signed-off-by: Konrad Leszczynski --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 244ef484bb88..8977e5aebc71 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -950,7 +950,9 @@ static void stmmac_mac_link_down(struct phylink_config *config, { struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev)); - stmmac_mac_set(priv, priv->ioaddr, false); + if (!(priv->plat->flags & STMMAC_FLAG_ARP_OFFLOAD_EN)) + stmmac_mac_set(priv, priv->ioaddr, false); + if (priv->dma_cap.eee) stmmac_set_eee_pls(priv, priv->hw, false); @@ -4183,6 +4185,10 @@ static int stmmac_release(struct net_device *dev) /* Release and free the Rx/Tx resources */ free_dma_desc_resources(priv, &priv->dma_conf); + /* Disable MAC Rx/Tx */ + stmmac_mac_set(priv, priv->ioaddr, priv->plat->flags & + STMMAC_FLAG_ARP_OFFLOAD_EN); + /* Powerdown Serdes if there is */ if (priv->plat->serdes_powerdown) priv->plat->serdes_powerdown(dev, priv->plat->bsp_priv); -- 2.34.1