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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2018 09:24:26 +0000 (10:24 +0100)
commit9b72f8c448eceb2d0a683362f4a6f05b6f30c093
tree112b37c8ecc7af40d8e94d000dcb599cb96330da
parentc7f40ff40061bbf45a32a38100c4bddc0ab56840
net: mediatek: setup proper state for disabled GMAC on the default

[ Upstream commit 7352e252b5bf40d59342494a70354a2d436fd0cd ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c