net: mvpp2: fix the phylink mode validation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Wed, 19 Dec 2018 17:00:12 +0000 (18:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:38:35 +0000 (17:38 +0100)
commit5696ca93120bec35904f2078f59e50bca3d827b1
treebd7bd0a93d510e252b695bfb42dac8b4129f4c18
parentfe65dfcca1b9888d9ee9bfc7652be98a099f671e
net: mvpp2: fix the phylink mode validation

[ Upstream commit 1b451fb2051b464b9758c09a3492104403252e2b ]

The mvpp2_phylink_validate() sets all modes that are supported by a
given PPv2 port. An mistake made the 10000baseT_Full mode being
advertised in some cases when a port wasn't configured to perform at
10G. This patch fixes this.

Fixes: d97c9f4ab000 ("net: mvpp2: 1000baseX support")
Reported-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c