Skip to content

Commit f421031

Browse files
Jongsung Kimdavem330
authored andcommitted
net: stmmac: reset Tx desc base address before restarting Tx
Refer to the databook of DesignWare Cores Ethernet MAC Universal: 6.2.1.5 Register 4 (Transmit Descriptor List Address Register If this register is not changed when the ST bit is set to 0, then the DMA takes the descriptor address where it was stopped earlier. The stmmac_tx_err() does zero indices to Tx descriptors, but does not reset HW current Tx descriptor address. To fix inconsistency, the base address of the Tx descriptors should be rewritten before restarting Tx. Signed-off-by: Jongsung Kim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a6a10d4 commit f421031

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,8 @@ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
20092009
tx_q->cur_tx = 0;
20102010
tx_q->mss = 0;
20112011
netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, chan));
2012+
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
2013+
tx_q->dma_tx_phy, chan);
20122014
stmmac_start_tx_dma(priv, chan);
20132015

20142016
priv->dev->stats.tx_errors++;

0 commit comments

Comments
 (0)