summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 1ab958769b96..027b566bb9c0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3249,9 +3249,6 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
return -EINVAL;
}
- if (priv->extend_desc && (priv->mode == STMMAC_RING_MODE))
- priv->plat->dma_cfg->atds = 1;
-
ret = stmmac_prereset_configure(priv);
if (ret)
return ret;
@@ -7444,6 +7441,13 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
return ret;
}
+ /* Set alternate descriptor size (which tells the hardware that
+ * descriptors are 8 32-bit words) when using extended descriptors
+ * with ring mode. Only applicable for pre-v4.0 cores.
+ */
+ if (priv->extend_desc && priv->mode == STMMAC_RING_MODE)
+ priv->plat->dma_cfg->atds = 1;
+
/* Rx Watchdog is available in the COREs newer than the 3.40.
* In some case, for example on bugged HW this feature
* has to be disable and this can be done by passing the