stmmac: fix Transmit Underflow error
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Sun, 10 Apr 2011 23:16:46 +0000 (23:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2011 19:55:48 +0000 (12:55 -0700)
On some old MAC chips without COE sometime the
Transmit Underflow error is issued.

The driver aborted all the transmission process
and initialized it from scratch.
This breaks the network activity as raised by Nachiketa
on a SPEAr board.

The patch is to fix this rare underflow event.
The driver will only clear the interrupt and the Tx
DMA will go out the Suspend state as soon as the
descriptor is fetched again.
The driver will continue to bump-up the DMA FIFO threshold
that, indeed, helped somebody to prevent this kind of error
in the past as well.

Reported-by: Nachiketa Prachanda <nprachanda@ncomputing.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/stmmac/stmmac_main.c

index 38f7b619c44c15e6a3dcda62ea511cad61d5451c..cc973fc384052bc2a5315aa982237b5bbc31015f 100644 (file)
@@ -750,7 +750,6 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
                        priv->hw->dma->dma_mode(priv->ioaddr, tc, SF_DMA_MODE);
                        priv->xstats.threshold = tc;
                }
-               stmmac_tx_err(priv);
        } else if (unlikely(status == tx_hard_error))
                stmmac_tx_err(priv);
 }