net: mediatek: setup proper state for disabled GMAC on the default
authorSean Wang <sean.wang@mediatek.com>
Mon, 18 Dec 2017 09:00:17 +0000 (17:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Dec 2017 18:18:31 +0000 (13:18 -0500)
commit7352e252b5bf40d59342494a70354a2d436fd0cd
tree2cb9009a1e250b7b0473781cc844fa4cd17e192a
parent8ba6b30ef700e16f3bc668e6f4f8375da9229e4d
net: mediatek: setup proper state for disabled GMAC on the default

The current solution would setup fixed and force link of 1Gbps to the both
GMAC on the default. However, The GMAC should always be put to link down
state when the GMAC is disabled on certain target boards. Otherwise,
the driver possibly receives unexpected data from the floating hardware
connection through the unused GMAC. Although the driver had been added
certain protection in RX path to get rid of such kind of unexpected data
sent to the upper stack.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c