diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2015-01-22 14:55:56 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-26 15:48:01 -0800 |
commit | c405abe2e0623b7841a88d43add2c7c9bc3e74a9 (patch) | |
tree | 69507de29e8f482af7f87494a0699d56b7bc87ab | |
parent | 6039e3dff09c6b55612125c53127827723b80ce9 (diff) | |
download | linux-c405abe2e0623b7841a88d43add2c7c9bc3e74a9.tar.bz2 |
stmmac: if force_thresh_dma_mode is set, pass tc to both txmode and rxmode in tx_hard_error_bump_tc interrupt
Dont' pass SF_DMA_MODE to rxmode in this case.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d7fc2b5a1408..6e2a8fa07da5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1454,7 +1454,11 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv) /* Try to bump up the dma threshold on this failure */ if (unlikely(tc != SF_DMA_MODE) && (tc <= 256)) { tc += 64; - priv->hw->dma->dma_mode(priv->ioaddr, tc, SF_DMA_MODE); + if (priv->plat->force_thresh_dma_mode) + priv->hw->dma->dma_mode(priv->ioaddr, tc, tc); + else + priv->hw->dma->dma_mode(priv->ioaddr, tc, + SF_DMA_MODE); priv->xstats.threshold = tc; } } else if (unlikely(status == tx_hard_error)) |