diff options
author | MarkLee <Mark-MC.Lee@mediatek.com> | 2019-11-13 05:38:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-15 02:13:28 +0300 |
commit | 8d66a8183d0cc3a3667f9e179999736fad4519f3 (patch) | |
tree | 8c3b10fd674fc09286a2e2b16423452f14c7daaf /drivers/net/ethernet/mediatek/mtk_eth_soc.c | |
parent | 5ac9eda060c74aaa399d0c3ddd6bc244c8e2de96 (diff) | |
download | linux-8d66a8183d0cc3a3667f9e179999736fad4519f3.tar.xz |
net: ethernet: mediatek: Enable GDM GDMA_DROP_ALL mode
Enable GDM GDMA_DROP_ALL mode to drop all packet during the
stop operation. This is recommended by the mt762x HW design
to drop all packet from GMAC before stopping PDMA.
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek/mtk_eth_soc.c')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index bb9e260d34e4..1923ba76a1ec 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2279,6 +2279,8 @@ static int mtk_stop(struct net_device *dev) if (!refcount_dec_and_test(ð->dma_refcnt)) return 0; + mtk_gdm_config(eth, MTK_GDMA_DROP_ALL); + mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); mtk_rx_irq_disable(eth, MTK_RX_DONE_INT); napi_disable(ð->tx_napi); |