summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sun8i_emac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index c567b9e082..335c85f3c2 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -431,10 +431,10 @@ static void tx_descs_init(struct emac_eth_dev *priv)
/* Correcting the last pointer of the chain */
desc_p->next = (uintptr_t)&desc_table_p[0];
- /* Flush all Tx buffer descriptors */
+ /* Flush the first TX buffer descriptor we will tell the MAC about. */
flush_dcache_range((uintptr_t)priv->tx_chain,
(uintptr_t)priv->tx_chain +
- sizeof(priv->tx_chain));
+ sizeof(priv->tx_chain[0]));
writel((uintptr_t)&desc_table_p[0], priv->mac_reg + EMAC_TX_DMA_DESC);
priv->tx_currdescnum = 0;