net: calxedaxgmac: fix net timeout recovery
authorRob Herring <rob.herring@calxeda.com>
Mon, 9 Jul 2012 14:16:07 +0000 (14:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2012 06:25:47 +0000 (23:25 -0700)
Fix net tx watchdog timeout recovery. The descriptor ring was reset,
but the DMA engine was not reset to the beginning of the ring.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/calxeda/xgmac.c

index 11f667f6131abf97c34faf9f5bac9dec887f17f3..c4fd2e3600c7485c471305c4e19a4dec3299bed1 100644 (file)
@@ -933,6 +933,7 @@ static void xgmac_tx_err(struct xgmac_priv *priv)
        desc_init_tx_desc(priv->dma_tx, DMA_TX_RING_SZ);
        priv->tx_tail = 0;
        priv->tx_head = 0;
+       writel(priv->dma_tx_phy, priv->base + XGMAC_DMA_TX_BASE_ADDR);
        writel(reg | DMA_CONTROL_ST, priv->base + XGMAC_DMA_CONTROL);
 
        writel(DMA_STATUS_TU | DMA_STATUS_TPS | DMA_STATUS_NIS | DMA_STATUS_AIS,