diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2015-01-22 01:55:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-26 18:48:01 -0500 |
commit | dec2165ff38a99f937fe61875d102c6c8596c815 (patch) | |
tree | ef8058cb2b79fa11fa93f02dcb89d78f1ed6aa06 /drivers/net/ethernet/stmicro | |
parent | c405abe2e0623b7841a88d43add2c7c9bc3e74a9 (diff) |
stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set
Clear the TX COE bit when force_thresh_dma_mode is set even hardware
dma capability says support.
Tested on BF609.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-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 6e2a8fa07da5..5ef493aa5387 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -2755,7 +2755,11 @@ static int stmmac_hw_init(struct stmmac_priv *priv) | |||
2755 | priv->plat->enh_desc = priv->dma_cap.enh_desc; | 2755 | priv->plat->enh_desc = priv->dma_cap.enh_desc; |
2756 | priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up; | 2756 | priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up; |
2757 | 2757 | ||
2758 | priv->plat->tx_coe = priv->dma_cap.tx_coe; | 2758 | /* TXCOE doesn't work in thresh DMA mode */ |
2759 | if (priv->plat->force_thresh_dma_mode) | ||
2760 | priv->plat->tx_coe = 0; | ||
2761 | else | ||
2762 | priv->plat->tx_coe = priv->dma_cap.tx_coe; | ||
2759 | 2763 | ||
2760 | if (priv->dma_cap.rx_coe_type2) | 2764 | if (priv->dma_cap.rx_coe_type2) |
2761 | priv->plat->rx_coe = STMMAC_RX_COE_TYPE2; | 2765 | priv->plat->rx_coe = STMMAC_RX_COE_TYPE2; |