mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
net: mvpp2: fix the phylink mode validation
[ Upstream commit1b451fb205] 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:d97c9f4ab0("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fe65dfcca1
commit
5696ca9312
@@ -4293,6 +4293,7 @@ static void mvpp2_phylink_validate(struct net_device *dev,
|
||||
case PHY_INTERFACE_MODE_XAUI:
|
||||
case PHY_INTERFACE_MODE_NA:
|
||||
if (port->gop_id == 0) {
|
||||
phylink_set(mask, 10000baseT_Full);
|
||||
phylink_set(mask, 10000baseCR_Full);
|
||||
phylink_set(mask, 10000baseSR_Full);
|
||||
phylink_set(mask, 10000baseLR_Full);
|
||||
@@ -4310,7 +4311,6 @@ static void mvpp2_phylink_validate(struct net_device *dev,
|
||||
phylink_set(mask, 10baseT_Full);
|
||||
phylink_set(mask, 100baseT_Half);
|
||||
phylink_set(mask, 100baseT_Full);
|
||||
phylink_set(mask, 10000baseT_Full);
|
||||
/* Fall-through */
|
||||
case PHY_INTERFACE_MODE_1000BASEX:
|
||||
case PHY_INTERFACE_MODE_2500BASEX:
|
||||
|
||||
Reference in New Issue
Block a user