net: stmmac: dwmac4: fix flow control issue
authorBiao Huang <biao.huang@mediatek.com>
Mon, 3 Jun 2019 01:58:06 +0000 (09:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:14:04 +0000 (09:14 +0200)
commit1a0a837afc413a289f85d4750225fb200021768e
tree53f32125d97775a647da24ec1e85b8907c09acb4
parent713737cac327e839044e60ae74fa99dce0021e1f
net: stmmac: dwmac4: fix flow control issue

[ Upstream commit ee326fd01e79dfa42014d55931260b68b9fa3273 ]

Current dwmac4_flow_ctrl will not clear
GMAC_RX_FLOW_CTRL_RFE/GMAC_RX_FLOW_CTRL_RFE bits,
so MAC hw will keep flow control on although expecting
flow control off by ethtool. Add codes to fix it.

Fixes: 477286b53f55 ("stmmac: add GMAC4 core support")
Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c