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:23:22 +0000 (10:23 +0100)
commit757677d0da516f9f60b7a855ecbf10b73263e006
treef585f246b99832ac65fe71a7c287b4913882a594
parent1ec97b2a4475e6157ec84b2a5d14530861badd0c
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@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c