This patch hooks up the emac_dump_regs() function to use cpdma dump routines. Further, we dump registers on transmit timeout, to make such timeouts debuggable.
Signed-off-by: Cyril Chemparathy <cy...@ti.com> Signed-off-by: Michael Williamson <michael.william...@criticallink.com> Signed-off-by: Caglar Akyuz <caglarak...@gmail.com> --- drivers/net/davinci_emac.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 9e866ae..2a628d1 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -460,6 +460,8 @@ static void emac_dump_regs(struct emac_priv *priv) emac_read(EMAC_RXMOFOVERRUNS)); dev_info(emac_dev, "EMAC: rx_dma_overruns:%d\n", emac_read(EMAC_RXDMAOVERRUNS)); + + cpdma_ctlr_dump(priv->dma); } /** @@ -1115,6 +1117,8 @@ static void emac_dev_tx_timeout(struct net_device *ndev) if (netif_msg_tx_err(priv)) dev_err(emac_dev, "DaVinci EMAC: xmit timeout, restarting TX"); + emac_dump_regs(priv); + ndev->stats.tx_errors++; emac_int_disable(priv); cpdma_chan_stop(priv->txchan); -- 1.7.0.4 _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source